Inheritance and default tables in 10g

Hello
If I understand correctly versions of the same complextype in 10g is supported through different schema locations for the same namespace.
In this case I can't understand the next situation.
Here is the shema which declares "content" element.
This one is located in "oebs_content_organization_element.xsd" file.
<?xml version="1.0" encoding="windows-1251" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:organization="http://www.rosbank.ru/oebs/content/organization"
targetNamespace="http://www.rosbank.ru/oebs/content/organization"
xmlns:oebs="http://www.rosbank.ru/oebs" elementFormDefault="unqualified"
xmlns:xdb="http://xmlns.oracle.com/xdb">
<xsd:include schemaLocation="oebs_content_organization.xsd"/>
<xsd:import schemaLocation="oebs.xsd" namespace="http://www.rosbank.ru/oebs"/>
<xsd:element name="content" type="organization:contentOrganizationType"
substitutionGroup="oebs:contentAbstract" xdb:SQLName="CONTENT_ORGANIZATION"
xdb:defaultTable="CONTENT_ORGANIZATION"/>
</xsd:schema>
And here is the schema which defines a complextype for the "content" element.
This one is located in "oebs_content_organization.xsd" file.
<?xml version="1.0" encoding="windows-1251" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:oebs="http://www.rosbank.ru/oebs"
targetNamespace="http://www.rosbank.ru/oebs/content/organization"
xmlns:appsxx_organization="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/appsxx_organization_v"
elementFormDefault="unqualified" xmlns:xdb="http://xmlns.oracle.com/xdb">
<xsd:import schemaLocation="oebs.xsd" namespace="http://www.rosbank.ru/oebs"/>
<xsd:import namespace="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/appsxx_organization_v"
schemaLocation="AppsXx_Organization_V.xsd"/>
<xsd:complexType name="contentOrganizationType" xdb:SQLType="CONTENT_ORGANIZATION_T">
<xsd:complexContent>
<xsd:extension base="oebs:contentAbstractType">
<xsd:sequence minOccurs="1" maxOccurs="1">
<xsd:element name="organization" minOccurs="1" maxOccurs="1" xdb:SQLInline="false"
xdb:defaultTable="ORGANIZATION"
type="appsxx_organization:AppsXx_Organization_V"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:schema>
As you can see, a defaultTable for the "organization" element is "ORGANIZATION"
Ok
I insert an instance which satisfies these schemas.
<oebs:root xmlns:oebs="http://www.rosbank.ru/oebs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.rosbank.ru/oebs oebs.xsd">
<h:header xmlns:h="http://www.rosbank.ru/oebs/header" xsi:schemaLocation="http://www.rosbank.ru/oebs/header oebs_header_element.xsd">
<time>2008-03-17T09:00:00</time>
</h:header>
<c:content xmlns:c="http://www.rosbank.ru/oebs/content/organization" xsi:schemaLocation="http://www.rosbank.ru/oebs/content/organization oebs_content_organization_element.xsd">
<organization>
<org_structure_version_id>1</org_structure_version_id>
     </organization>
</c:content>
And after that I check where my instance is located.
select count(*) from "ORGANIZATION";
COUNT(*)
1
Ok, all right.

You can also do it this way
SQL> --
SQL> connect sys/ as sysdba
Connected.
SQL> set define on
SQL> set timing on
SQL> --
SQL> define USERNAME = ROSBANK
SQL> --
SQL> def PASSWORD = ROSBANK
SQL> --
SQL> def USER_TABLESPACE = USERS
SQL> --
SQL> def TEMP_TABLESPACE = TEMP
SQL> --
SQL> def DIRECTORY_PATH = &1
SQL> --
SQL> drop user &USERNAME cascade
  2  /
old   1: drop user &USERNAME cascade
new   1: drop user ROSBANK cascade
User dropped.
Elapsed: 00:00:06.40
SQL> grant create any directory, drop any directory, connect, resource, alter session, create view to &USERNAME identified by &PASSWORD
  2  /
old   1: grant create any directory, drop any directory, connect, resource, alter session, create view to &USERNAME identified by &PASSWORD
new   1: grant create any directory, drop any directory, connect, resource, alter session, create view to ROSBANK identified by ROSBANK
Grant succeeded.
Elapsed: 00:00:00.04
SQL> alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
  2  /
old   1: alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
new   1: alter user ROSBANK default tablespace USERS temporary tablespace TEMP
User altered.
Elapsed: 00:00:00.00
SQL> connect &USERNAME/&PASSWORD
Connected.
SQL> --
SQL> alter session set events ='19027 trace name context forever, level 0x800'
  2  /
Session altered.
Elapsed: 00:00:00.00
SQL> call xdb_utilities.createHomeFolder()
  2  /
Call completed.
Elapsed: 00:00:00.34
SQL> create or replace directory XMLDIR as '&DIRECTORY_PATH'
  2  /
old   1: create or replace directory XMLDIR as '&DIRECTORY_PATH'
new   1: create or replace directory XMLDIR as 'C:\xdb\bugs\6933516'
Directory created.
Elapsed: 00:00:00.00
SQL> var oebs CLOB
SQL> var oebs_header CLOB
SQL> var oebs_header_element CLOB
SQL> var oebs_content_organization CLOB
SQL> var oebs_content_organization2 CLOB
SQL> var oebs_content_organization_elem CLOB
SQL> var oebs_content_organization_e2 CLOB
SQL> var JDBCASI CLOB
SQL> VAR AppsXx_Organization_V CLOB
SQL>
SQL> --
SQL> begin
  2    :AppsXx_Organization_V :=
  3  '<?xml version="1.0" encoding="UTF-8"?>
  4  <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:appsxx_organization_v="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/appsxx_organization_v" xmlns:jdbcasi="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/metadata" targetNamespace="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/appsxx_organization_v">
  5       <import namespace="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/metadata" schemaLocation="JDBCASI.xsd"/>
  6       <annotation>
  7            <appinfo source="commonj.connector.asi">
  8                 <asi:annotationSet xmlns:asi="commonj.connector.asi" asiNSURI="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/metadata"/>
  9            </appinfo>
10       </annotation>
11       <complexType name="AppsXx_Organization_V">
12            <annotation>
13                 <appinfo source="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/metadata">
14                      <jdbcasi:JDBCBusinessObjectTypeMetadata xmlns:jdbcasi="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/metadata">
15                           <jdbcasi:TableName>APPS.XX_ORGANIZATION_V</jdbcasi:TableName>
16                      </jdbcasi:JDBCBusinessObjectTypeMetadata>
17                 </appinfo>
18            </annotation>
19            <sequence minOccurs="1" maxOccurs="1">
20                 <element name="org_structure_version_id" type="string" minOccurs="0" maxOccurs="1">
21                      <annotation>
22                           <appinfo source="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/metadata">
23                                <jdbcasi:JDBCAttributeTypeMetadata xmlns:jdbcasi="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/metadata">
24                                     <jdbcasi:ColumnName>ORG_STRUCTURE_VERSION_ID</jdbcasi:ColumnName>
25                                     <jdbcasi:PrimaryKey>false</jdbcasi:PrimaryKey>
26                                </jdbcasi:JDBCAttributeTypeMetadata>
27                           </appinfo>
28                      </annotation>
29                 </element>
30                 <element name="organization_id" type="string" minOccurs="0" maxOccurs="1">
31                      <annotation>
32                           <appinfo source="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/metadata">
33                                <jdbcasi:JDBCAttributeTypeMetadata xmlns:jdbcasi="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/metadata">
34                                     <jdbcasi:ColumnName>ORGANIZATION_ID</jdbcasi:ColumnName>
35                                     <jdbcasi:PrimaryKey>false</jdbcasi:PrimaryKey>
36                                </jdbcasi:JDBCAttributeTypeMetadata>
37                           </appinfo>
38                      </annotation>
39                 </element>
40                 <element name="organization_id_hrom" type="string" minOccurs="0" maxOccurs="1">
41                      <annotation>
42                           <appinfo source="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/metadata">
43                                <jdbcasi:JDBCAttributeTypeMetadata xmlns:jdbcasi="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/metadata">
44                                     <jdbcasi:ColumnName>ORGANIZATION_ID_HROM</jdbcasi:ColumnName>
45                                     <jdbcasi:PrimaryKey>false</jdbcasi:PrimaryKey>
46                                </jdbcasi:JDBCAttributeTypeMetadata>
47                           </appinfo>
48                      </annotation>
49                 </element>
50                 <element name="organization_id_parent_hrom" type="string" minOccurs="0" maxOccurs="1">
51                      <annotation>
52                           <appinfo source="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/metadata">
53                                <jdbcasi:JDBCAttributeTypeMetadata xmlns:jdbcasi="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/metadata">
54                                     <jdbcasi:ColumnName>ORGANIZATION_ID_PARENT_HROM</jdbcasi:ColumnName>
55                                     <jdbcasi:PrimaryKey>false</jdbcasi:PrimaryKey>
56                                </jdbcasi:JDBCAttributeTypeMetadata>
57                           </appinfo>
58                      </annotation>
59                 </element>
60                 <element name="event_name" type="string" minOccurs="0" maxOccurs="1">
61                      <annotation>
62                           <appinfo source="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/metadata">
63                                <jdbcasi:JDBCAttributeTypeMetadata xmlns:jdbcasi="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/metadata">
64                                     <jdbcasi:ColumnName>EVENT_NAME</jdbcasi:ColumnName>
65                                     <jdbcasi:PrimaryKey>false</jdbcasi:PrimaryKey>
66                                </jdbcasi:JDBCAttributeTypeMetadata>
67                           </appinfo>
68                      </annotation>
69                 </element>
70                 <element name="org_name" type="string" minOccurs="0" maxOccurs="1">
71                      <annotation>
72                           <appinfo source="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/metadata">
73                                <jdbcasi:JDBCAttributeTypeMetadata xmlns:jdbcasi="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/metadata">
74                                     <jdbcasi:ColumnName>ORG_NAME</jdbcasi:ColumnName>
75                                     <jdbcasi:PrimaryKey>false</jdbcasi:PrimaryKey>
76                                </jdbcasi:JDBCAttributeTypeMetadata>
77                           </appinfo>
78                      </annotation>
79                 </element>
80                 <element name="date_from" type="string" minOccurs="0" maxOccurs="1">
81                      <annotation>
82                           <appinfo source="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/metadata">
83                                <jdbcasi:JDBCAttributeTypeMetadata xmlns:jdbcasi="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/metadata">
84                                     <jdbcasi:ColumnName>DATE_FROM</jdbcasi:ColumnName>
85                                     <jdbcasi:PrimaryKey>false</jdbcasi:PrimaryKey>
86                                </jdbcasi:JDBCAttributeTypeMetadata>
87                           </appinfo>
88                      </annotation>
89                 </element>
90                 <element name="date_to" type="string" minOccurs="0" maxOccurs="1">
91                      <annotation>
92                           <appinfo source="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/metadata">
93                                <jdbcasi:JDBCAttributeTypeMetadata xmlns:jdbcasi="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/metadata">
94                                     <jdbcasi:ColumnName>DATE_TO</jdbcasi:ColumnName>
95                                     <jdbcasi:PrimaryKey>false</jdbcasi:PrimaryKey>
96                                </jdbcasi:JDBCAttributeTypeMetadata>
97                           </appinfo>
98                      </annotation>
99                 </element>
100                 <element name="organization_id_parent" type="string" minOccurs="0" maxOccurs="1">
101                      <annotation>
102                           <appinfo source="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/metadata">
103                                <jdbcasi:JDBCAttributeTypeMetadata xmlns:jdbcasi="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/metadata">
104                                     <jdbcasi:ColumnName>ORGANIZATION_ID_PARENT</jdbcasi:ColumnName>
105                                     <jdbcasi:PrimaryKey>false</jdbcasi:PrimaryKey>
106                                </jdbcasi:JDBCAttributeTypeMetadata>
107                           </appinfo>
108                      </annotation>
109                 </element>
110                 <element name="organization_code" type="string" minOccurs="0" maxOccurs="1">
111                      <annotation>
112                           <appinfo source="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/metadata">
113                                <jdbcasi:JDBCAttributeTypeMetadata xmlns:jdbcasi="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/metadata">
114                                     <jdbcasi:ColumnName>ORGANIZATION_CODE</jdbcasi:ColumnName>
115                                     <jdbcasi:PrimaryKey>false</jdbcasi:PrimaryKey>
116                                </jdbcasi:JDBCAttributeTypeMetadata>
117                           </appinfo>
118                      </annotation>
119                 </element>
120                 <element name="organization_type" type="string" minOccurs="0" maxOccurs="1">
121                      <annotation>
122                           <appinfo source="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/metadata">
123                                <jdbcasi:JDBCAttributeTypeMetadata xmlns:jdbcasi="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/metadata">
124                                     <jdbcasi:ColumnName>ORGANIZATION_TYPE</jdbcasi:ColumnName>
125                                     <jdbcasi:PrimaryKey>false</jdbcasi:PrimaryKey>
126                                </jdbcasi:JDBCAttributeTypeMetadata>
127                           </appinfo>
128                      </annotation>
129                 </element>
130                 <element name="max_last_update_date" type="string" minOccurs="0" maxOccurs="1">
131                      <annotation>
132                           <appinfo source="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/metadata">
133                                <jdbcasi:JDBCAttributeTypeMetadata xmlns:jdbcasi="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/metadata">
134                                     <jdbcasi:ColumnName>MAX_LAST_UPDATE_DATE</jdbcasi:ColumnName>
135                                     <jdbcasi:PrimaryKey>false</jdbcasi:PrimaryKey>
136                                </jdbcasi:JDBCAttributeTypeMetadata>
137                           </appinfo>
138                      </annotation>
139                 </element>
140                 <element name="p_union_par" type="string" minOccurs="0" maxOccurs="1">
141                      <annotation>
142                           <appinfo source="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/metadata">
143                                <jdbcasi:JDBCAttributeTypeMetadata xmlns:jdbcasi="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/metadata">
144                                     <jdbcasi:ColumnName>P_UNION_PAR</jdbcasi:ColumnName>
145                                     <jdbcasi:PrimaryKey>true</jdbcasi:PrimaryKey>
146                                </jdbcasi:JDBCAttributeTypeMetadata>
147                           </appinfo>
148                      </annotation>
149                 </element>
150            </sequence>
151       </complexType>
152  </schema>
153  ';
154 
155    :JDBCASI :=
156  '<?xml version="1.0" encoding="UTF-8"?>
157  <schema targetNamespace="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/metadata" xmlns:jdbcasi="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/metadata" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:botm="http://www.ibm.com/wbi/BusinessObjectMetadata" elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema">
158       <simpleType name="OrderingScheme">
159            <restriction base="string">
160                 <enumeration value=""/>
161                 <enumeration value="implicit"/>
162                 <enumeration value="visual"/>
163            </restriction>
164       </simpleType>
165       <simpleType name="Orientation">
166            <restriction base="string">
167                 <enumeration value=""/>
168                 <enumeration value="LTR"/>
169                 <enumeration value="RTL"/>
170                 <enumeration value="contextual_LTR"/>
171                 <enumeration value="contextual_RTL"/>
172            </restriction>
173       </simpleType>
174       <simpleType name="TrueFalse">
175            <restriction base="string">
176                 <enumeration value=""/>
177                 <enumeration value="true"/>
178                 <enumeration value="false"/>
179            </restriction>
180       </simpleType>
181       <simpleType name="NumeralShapes">
182            <restriction base="string">
183                 <enumeration value=""/>
184                 <enumeration value="nominal"/>
185                 <enumeration value="national"/>
186                 <enumeration value="contextual"/>
187            </restriction>
188       </simpleType>
189       <simpleType name="TextShapes">
190            <restriction base="string">
191                 <enumeration value=""/>
192                 <enumeration value="nominal"/>
193                 <enumeration value="shaped"/>
194                 <enumeration value="initial"/>
195                 <enumeration value="middle"/>
196                 <enumeration value="final"/>
197                 <enumeration value="isolated"/>
198            </restriction>
199       </simpleType>
200       <complexType name="Bi_DirectionStringTD">
201            <sequence minOccurs="1" maxOccurs="1">
202                 <element name="orderingScheme" type="jdbcasi:OrderingScheme"/>
203                 <element name="orientation" type="jdbcasi:Orientation"/>
204                 <element name="symmetricSwapping" type="jdbcasi:TrueFalse"/>
205                 <element name="numeralShapes" type="jdbcasi:NumeralShapes"/>
206                 <element name="textShape" type="jdbcasi:TextShapes"/>
207            </sequence>
208       </complexType>
209       <simpleType name="SpecString">
210            <restriction base="string">
211                 <enumeration value="NORMAL_STRING"/>
212                 <enumeration value="JDBC_URL_SQL"/>
213                 <enumeration value="SAP_WHERE_CLAUSE"/>
214            </restriction>
215       </simpleType>
216       <complexType name="BiDiContext">
217            <sequence minOccurs="0" maxOccurs="1">
218                 <element name="BiDiEIS" type="jdbcasi:Bi_DirectionStringTD" minOccurs="0"/>
219                 <element name="BiDiMetadata" type="jdbcasi:Bi_DirectionStringTD" minOccurs="0"/>
220                 <element name="BiDiSkip" type="jdbcasi:TrueFalse" minOccurs="0"/>
221                 <element name="BiDiSpecFormat" type="jdbcasi:SpecString" minOccurs="0"/>
222            </sequence>
223       </complexType>
224       <complexType name="AttrBiDiContext">
225            <sequence minOccurs="0" maxOccurs="1">
226                 <element name="BiDiMetadata" type="jdbcasi:Bi_DirectionStringTD" minOccurs="0"/>
227                 <element name="BiDiSkip" type="jdbcasi:TrueFalse" minOccurs="0"/>
228                 <element name="BiDiSpecFormat" type="jdbcasi:SpecString" minOccurs="0"/>
229            </sequence>
230       </complexType>
231       <complexType name="JDBCBusinessObjectTypeMetadata">
232            <sequence minOccurs="0" maxOccurs="1">
233                 <element name="TableName" type="string"/>
234                 <element name="BiDiContextTableName" type="jdbcasi:AttrBiDiContext"/>
235                 <element name="StatusColumnName" type="string"/>
236                 <element name="BiDiContextStatusColumnName" type="jdbcasi:AttrBiDiContext"/>
237                 <element name="SPName" type="string" minOccurs="0"/>
238                 <element name="BiDiContextSPName" type="jdbcasi:AttrBiDiContext"/>
239                 <element name="ResultSet" type="boolean" minOccurs="0"/>
240                 <element name="MaxNumOfRetRS" type="integer" minOccurs="0"/>
241                 <element name="ReturnValue" type="string" minOccurs="0"/>
242                 <element name="SelectStatement" type="string" minOccurs="0"/>
243                 <element name="BiDiContextSelectStatement" type="jdbcasi:AttrBiDiContext"/>
244                 <element name="StatusValue" type="string" minOccurs="0"/>
245                 <element name="Operation" type="jdbcasi:JDBCOperationTypeMetadata" minOccurs="0" maxOccurs="unbounded"/>
246                 <element name="BiDiContext" type="jdbcasi:BiDiContext"/>
247            </sequence>
248       </complexType>
249       <complexType name="JDBCOperationTypeMetadata">
250            <sequence minOccurs="0" maxOccurs="1">
251                 <element name="Name" type="string"/>
252                 <element name="StoredProcedures" type="jdbcasi:StoredProcedureDefn" minOccurs="0" maxOccurs="unbounded"/>
253            </sequence>
254       </complexType>
255       <complexType name="StoredProcedureDefn">
256            <sequence minOccurs="0" maxOccurs="1">
257                 <element name="StoredProcedureType" type="string"/>
258                 <element name="StoredProcedureName" type="string"/>
259                 <element name="BiDiContextStoredProcedureName" type="jdbcasi:AttrBiDiContext"/>
260                 <element name="ResultSet" type="boolean"/>
261                 <element name="ReturnValue" type="string" minOccurs="0"/>
262                 <element name="Parameters" type="jdbcasi:ParameterPair" minOccurs="0" maxOccurs="unbounded"/>
263            </sequence>
264       </complexType>
265       <simpleType name="ParameterType">
266            <restriction base="string">
267                 <enumeration value="IP"/>
268                 <enumeration value="IO"/>
269                 <enumeration value="OP"/>
270                 <enumeration value="RS"/>
271            </restriction>
272       </simpleType>
273       <simpleType name="ChildBOParameterType">
274            <restriction base="string">
275                 <enumeration value="Struct"/>
276                 <enumeration value="Array"/>
277                 <enumeration value="ResultSet"/>
278            </restriction>
279       </simpleType>
280       <simpleType name="DateTypeTransfer">
281            <restriction base="string">
282                 <enumeration value="Time"/>
283                 <enumeration value="Date"/>
284                 <enumeration value="TimeStamp"/>
285            </restriction>
286       </simpleType>
287       <complexType name="ParameterPair">
288            <sequence minOccurs="1" maxOccurs="1">
289                 <element name="Type" type="jdbcasi:ParameterType"/>
290                 <element name="PropertyName" type="string"/>
291                 <element name="BiDiContextPropertyName" type="jdbcasi:AttrBiDiContext"/>
292            </sequence>
293       </complexType>
294       <complexType name="JDBCAttributeTypeMetadata">
295            <sequence minOccurs="1" maxOccurs="1">
296                 <element name="ColumnName" type="string" minOccurs="0"/>
297                 <element name="BiDiContextColumnName" type="jdbcasi:AttrBiDiContext" minOccurs="0"/>
298                 <element name="PrimaryKey" type="boolean" minOccurs="0"/>
299                 <element name="ForeignKey" type="string" minOccurs="0"/>
300                 <element name="OrderBy" type="string" minOccurs="0"/>
301                 <element name="FixedChar" type="string" minOccurs="0"/>
302                 <element name="KeepRelationship" type="boolean" minOccurs="0"/>
303                 <element name="Ownership" type="boolean" minOccurs="0"/>
304                 <element name="UID" type="string" minOccurs="0"/>
305                 <element name="ByteArray" type="boolean" minOccurs="0"/>
306                 <element name="DateType" type="jdbcasi:DateTypeTransfer" minOccurs="0"/>
307                 <element name="BLOB" type="boolean" minOccurs="0"/>
308                 <element name="CLOB" type="boolean" minOccurs="0"/>
309                 <element name="SPParameterType" type="jdbcasi:ParameterType" minOccurs="0"/>
310                 <element name="ChildBOType" type="jdbcasi:ChildBOParameterType" minOccurs="0"/>
311                 <element name="BiDiContext" type="jdbcasi:BiDiContext" minOccurs="0"/>
312                 <element name="ChildBOTypeName" type="string" minOccurs="0"/>
313            </sequence>
314       </complexType>
315  </schema>
316  ';
317    :OEBS :=
318  '<?xml version="1.0" encoding="UTF-8"?>
319  <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oebs="http://www.rosbank.ru/oebs" targetNamespace="http://www.rosbank.ru/oebs" elementFormDefault="unqualified" xmlns:xdb="http://xmlns.oracle.com/xdb" xdb:storeVarrayAsTable="true">
320       <xsd:complexType name="rootType" xdb:SQLType="ROOT_T">
321            <xsd:sequence minOccurs="1" maxOccurs="1">
322                 <xsd:element minOccurs="0" maxOccurs="1" ref="oebs:headerAbstract"/>
323                 <xsd:element minOccurs="0" maxOccurs="1" ref="oebs:contentAbstract" xdb:SQLInline="false" xdb:defaultTable="CONTENT"/>
324            </xsd:sequence>
325       </xsd:complexType>
326       <xsd:complexType name="headerAbstractType" xdb:SQLType="HEADERABSTRACT_T" abstract="true"/>
327       <xsd:complexType name="contentAbstractType" xdb:SQLType="CONTENTABSTRACT_T" abstract="true"/>
328       <xsd:element name="root" type="oebs:rootType" xdb:defaultTable="OEBS"/>
329       <xsd:element name="headerAbstract" abstract="true" xdb:SQLName="HEADER" type="oebs:headerAbstractType" xdb:defaultTable=""/>
330       <xsd:element name="contentAbstract" abstract="true" xdb:SQLName="CONTENT" type="oebs:contentAbstractType" xdb:defaultTable=""/>
331  </xsd:schema>';
332 
333    :oebs_header :=
334  '<?xml version="1.0" encoding="windows-1251"?>
335  <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oebs="http://www.rosbank.ru/oebs" xmlns:header="http://www.rosbank.ru/oebs/header" targetNamespace="http://www.rosbank.ru/oebs/header" xmlns:xdb="http://xmlns.oracle.com/xdb" elementFormDefault="unqualified">
336       <xsd:import schemaLocation="oebs.xsd" namespace="http://www.rosbank.ru/oebs"/>
337       <xsd:complexType name="headerType" xdb:SQLType="HEADER_T">
338            <xsd:complexContent>
339                 <xsd:extension base="oebs:headerAbstractType">
340                      <xsd:sequence minOccurs="1" maxOccurs="1">
341                           <xsd:element name="time" type="xsd:dateTime" minOccurs="1" maxOccurs="1" xdb:SQLType="TIMESTAMP WITH TIME ZONE"/>
342                      </xsd:sequence>
343                 </xsd:extension>
344            </xsd:complexContent>
345       </xsd:complexType>
346  </xsd:schema>
347  ';
348 
349    :oebs_header_element :=
350  '<?xml version="1.0" encoding="windows-1251"?>
351  <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:header="http://www.rosbank.ru/oebs/header" targetNamespace="http://www.rosbank.ru/oebs/header" xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:oebs="http://www.rosbank.ru/oebs" elementFormDefault="unqualified">
352       <xsd:include schemaLocation="oebs_header.xsd"/>
353       <xsd:import schemaLocation="oebs.xsd" namespace="http://www.rosbank.ru/oebs"/>
354       <xsd:element name="header" xdb:SQLName="HEADER" substitutionGroup="oebs:headerAbstract" type="header:headerType" xdb:defaultTable=""/>
355  </xsd:schema>
356  ';
357 
358    :oebs_content_organization :=
359  '<?xml version="1.0" encoding="windows-1251"?>
360  <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oebs="http://www.rosbank.ru/oebs" targetNamespace="http://www.rosbank.ru/oebs/content/organization" xmlns:appsxx_organization="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/appsxx_organization_v" elementFormDefault="unqualified" xmlns:xdb="http://xmlns.oracle.com/xdb">
361       <xsd:import schemaLocation="oebs.xsd" namespace="http://www.rosbank.ru/oebs"/>
362       <xsd:import namespace="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/appsxx_organization_v" schemaLocation="AppsXx_Organization_V.xsd"/>
363       <xsd:complexType name="contentOrganizationType" xdb:SQLType="CONTENTORGANIZATION_T">
364            <xsd:complexContent>
365                 <xsd:extension base="oebs:contentAbstractType">
366                      <xsd:sequence minOccurs="1" maxOccurs="1">
367                           <xsd:element name="organization" minOccurs="1" maxOccurs="1" type="appsxx_organization:AppsXx_Organization_V"/>
368                      </xsd:sequence>
369                 </xsd:extension>
370            </xsd:complexContent>
371       </xsd:complexType>
372  </xsd:schema>
373  ';
374 
375    :oebs_content_organization2 :=
376  '<?xml version="1.0" encoding="windows-1251"?>
377  <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oebs="http://www.rosbank.ru/oebs" targetNamespace="http://www.rosbank.ru/oebs/content/organization" xmlns:appsxx_organization="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/appsxx_organization_v" elementFormDefault="unqualified" xmlns:xdb="http://xmlns.oracle.com/xdb">
378       <xsd:import schemaLocation="oebs.xsd" namespace="http://www.rosbank.ru/oebs"/>
379       <xsd:import namespace="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/appsxx_organization_v" schemaLocation="AppsXx_Organization_V_v2.0.xsd"/>
380       <xsd:complexType name="contentOrganizationType" xdb:SQLType="CONTENT_ORGANIZATION_V2_0_T">
381            <xsd:complexContent>
382                 <xsd:extension base="oebs:contentAbstractType">
383                      <xsd:sequence minOccurs="1" maxOccurs="1">
384                           <xsd:element name="organization" minOccurs="1" maxOccurs="1" type="appsxx_organization:AppsXx_Organization_V"/>
385                      </xsd:sequence>
386                 </xsd:extension>
387            </xsd:complexContent>
388       </xsd:complexType>
389  </xsd:schema>';
390 
391    :oebs_content_organization_element :=
392  '<?xml version="1.0" encoding="windows-1251"?>
393  <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:organization="http://www.rosbank.ru/oebs/content/organization" targetNamespace="http://www.rosbank.ru/oebs/content/organization" xmlns:oebs="http://www.rosbank.ru/oebs" elementFormDefault="unqualified" xmlns:xdb="http://xmlns.oracle.com/xdb">
394       <xsd:include schemaLocation="oebs_content_organization.xsd"/>
395       <xsd:import schemaLocation="oebs.xsd" namespace="http://www.rosbank.ru/oebs"/>
396       <xsd:element name="content" type="organization:contentOrganizationType" substitutionGroup="oebs:contentAbstract" xdb:SQLName="CONTENTORGANIZATION" xdb:defaultTable=""/>
397  </xsd:schema>
398  ';
399 
400    :oebs_content_organization_e2 :=
401  '<?xml version="1.0" encoding="windows-1251"?>
402  <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:organization="http://www.rosbank.ru/oebs/content/organization" targetNamespace="http://www.rosbank.ru/oebs/content/organization" xmlns:oebs="http://www.rosbank.ru/oebs" elementFormDefault="unqualified" xmlns:xdb="http://xmlns.oracle.com/xdb">
403       <xsd:include schemaLocation="oebs_content_organization_v2.0.xsd"/>
404       <xsd:import schemaLocation="oebs.xsd" namespace="http://www.rosbank.ru/oebs"/>
405       <xsd:element name="content" type="organization:contentOrganizationType" substitutionGroup="oebs:contentAbstract" xdb:SQLName="CONTENT_ORGANIZATION" xdb:defaultTable=""/>
406  </xsd:schema>';
407 
408  end;
409  /
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.04
SQL> begin
  2    dbms_xmlschema.registerSchema
  3    (
  4        schemaurl => 'JDBCASI.xsd'
  5       ,schemadoc => :JDBCASI
  6       ,local     => TRUE
  7       ,genBean   => false
  8       ,genTypes  => TRUE
  9       ,genTables => TRUE
10       ,ENABLEHIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
11    );
12    dbms_xmlschema.registerSchema
13    (
14        schemaurl => 'AppsXx_Organization_V.xsd'
15       ,schemadoc => :AppsXx_Organization_V
16       ,local     => TRUE
17       ,genBean   => false
18       ,genTypes  => TRUE
19       ,genTables => TRUE
20       ,ENABLEHIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
21    );
22 
23    dbms_xmlschema.registerSchema
24    (
25        schemaurl => 'oebs.xsd'
26       ,schemadoc => :OEBS
27       ,local     => TRUE
28       ,genBean   => false
29       ,genTypes  => TRUE
30       ,genTables => TRUE
31       ,ENABLEHIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
32    );
33    dbms_xmlschema.registerSchema
34    (
35        schemaurl => 'oebs_header.xsd'
36       ,schemadoc => :oebs_header
37       ,local     => TRUE
38       ,genBean   => false
39       ,genTypes  => TRUE
40       ,genTables => TRUE
41       ,ENABLEHIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
42    );
43    dbms_xmlschema.registerSchema
44    (
45        schemaurl => 'oebs_header_element.xsd'
46       ,schemadoc => :oebs_header_element
47       ,local     => TRUE
48       ,genBean   => false
49       ,genTypes  => TRUE
50       ,genTables => TRUE
51       ,ENABLEHIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
52    );
53 
54    dbms_xmlschema.registerSchema
55    (
56        schemaurl => 'AppsXx_Organization_V_v2.0.xsd'
57       ,schemadoc => :AppsXx_Organization_V
58       ,local     => TRUE
59       ,genBean   => false
60       ,genTypes  => TRUE
61       ,genTables => TRUE
62       ,ENABLEHIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
63    );
64    dbms_xmlschema.registerSchema
65    (
66        schemaurl => 'oebs_content_organization.xsd'
67       ,schemadoc => :oebs_content_organization
68       ,local     => TRUE
69       ,genBean   => false
70       ,genTypes  => TRUE
71       ,genTables => TRUE
72       ,ENABLEHIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
73    );
74    dbms_xmlschema.registerSchema
75    (
76        schemaurl => 'oebs_content_organization_element.xsd'
77       ,schemadoc => :oebs_content_organization_elem
78       ,local     => TRUE
79       ,genBean   => false
80       ,genTypes  => TRUE
81       ,genTables => TRUE
82       ,ENABLEHIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
83    );
84 
85    dbms_xmlschema.registerSchema
86    (
87        schemaurl => 'oebs_content_organization_v2.0.xsd'
88       ,schemadoc => :oebs_content_organization2
89       ,local     => TRUE
90       ,genBean   => false
91       ,genTypes  => TRUE
92       ,genTables => TRUE
93       ,ENABLEHIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
94    );
95 
96    dbms_xmlschema.registerSchema
97    (
98        schemaurl => 'oebs_content_organization_element_v2.0.xsd'
99       ,schemadoc => :oebs_content_organization_e2
100       ,local     => TRUE
101       ,genBean   => false
102       ,genTypes  => TRUE
103       ,genTables => TRUE
104       ,ENABLEHIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
105    );
106  end;
107  /
PL/SQL procedure successfully completed.
Elapsed: 00:00:03.34
SQL> select TABLE_NAME, XMLSCHEMA, ELEMENT_NAME
  2    from USER_XML_TABLES
  3  /
OEBS                                                                                                                                                                                                   
oebs.xsd                                                                                                                                                                                               
root                                                                                                                                                                                                   
CONTENT                                                                                                                                                                                                
oebs.xsd                                                                                                                                                                                               
contentAbstract                                                                                                                                                                                        
Elapsed: 00:00:02.01
SQL> VAR INSTANCE CLOB
SQL> --
SQL> begin
  2    :INSTANCE :=
  3  '<oebs:root xmlns:oebs="http://www.rosbank.ru/oebs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.rosbank.ru/oebs oebs.xsd">
  4       <h:header xmlns:h="http://www.rosbank.ru/oebs/header" xsi:schemaLocation="http://www.rosbank.ru/oebs/header oebs_header_element.xsd">
  5            <time>2008-03-17T09:00:00</time>
  6       </h:header>
  7       <c:content xmlns:c="http://www.rosbank.ru/oebs/content/organization" xsi:schemaLocation="http://www.rosbank.ru/oebs/content/organization oebs_content_organization_element.xsd">
  8            <organization>
  9                 <org_structure_version_id>1</org_structure_version_id>
10            </organization>
11       </c:content>
12  </oebs:root>';
13  end;
14  /
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.00
SQL> call dbms_xdb.deleteResource('/home/ROSBANK/testcase1.xml',4)
  2  /
Call completed.
Elapsed: 00:00:00.04
SQL> declare
  2    res boolean;
  3  begin
  4    res := dbms_xdb.createResource('/home/ROSBANK/testcase1.xml',:INSTANCE);
  5  end;
  6  /
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.07
SQL> select count(*)
  2    from OEBS
  3  /
         1                                                                                                                                                                                             
Elapsed: 00:00:00.01
SQL> select count(*)
  2    from CONTENT
  3  /
         1                                                                                                                                                                                             
Elapsed: 00:00:00.00
SQL> select *
  2    from OEBS
  3  /
<oebs:root xmlns:oebs="http://www.rosbank.ru/oebs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.rosbank.ru/oebs oebs.xsd">                                     
  <h:header xmlns:h="http://www.rosbank.ru/oebs/header" xsi:schemaLocation="http://www.rosbank.ru/oebs/header oebs_header_element.xsd">                                                                
    <time>2008-03-17T09:00:00.000000+00:00</time>                                                                                                                                                      
  </h:header>                                                                                                                                                                                          
  <c:content xmlns:c="http://www.rosbank.ru/oebs/content/organization" xsi:schemaLocation="http://www.rosbank.ru/oebs/content/organization oebs_content_organization_element.xsd">                     
    <organization>                                                                                                                                                                                     
      <org_structure_version_id>1</org_structure_version_id>                                                                                                                                           
    </organization>                                                                                                                                                                                    
  </c:content>                                                                                                                                                                                         
</oebs:root>                                                                                                                                                                                           
Elapsed: 00:00:00.04
SQL> begin
  2    :INSTANCE :=
  3  '<oebs:root xmlns:oebs="http://www.rosbank.ru/oebs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.rosbank.ru/oebs oebs.xsd">
  4       <h:header xmlns:h="http://www.rosbank.ru/oebs/header" xsi:schemaLocation="http://www.rosbank.ru/oebs/header oebs_header_element.xsd">
  5            <time>2008-03-17T09:00:00</time>
  6       </h:header>
  7       <c:content xmlns:c="http://www.rosbank.ru/oebs/content/organization" xsi:schemaLocation="http://www.rosbank.ru/oebs/content/organization oebs_content_organization_element_V2.0.xsd">
  8            <organization>
  9                 <org_structure_version_id>1</org_structure_version_id>
10            </organization>
11       </c:content>
12  </oebs:root>';
13  end;
14  /
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.01
SQL> call dbms_xdb.deleteResource('/home/ROSBANK/testcase2.xml',4)
  2  /
Call completed.
Elapsed: 00:00:00.03
SQL> declare
  2    res boolean;
  3  begin
  4    res := dbms_xdb.createResource('/home/ROSBANK/testcase2.xml',:INSTANCE);
  5  end;
  6  /
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.01
SQL> select count(*)
  2    from OEBS
  3  /
         2                                                                                                                                                                                             
Elapsed: 00:00:00.00
SQL> select count(*)
  2    from CONTENT
  3  /
         2                                                                                                                                                                                             
Elapsed: 00:00:00.00
SQL> select *
  2    from OEBS
  3  /
<oebs:root xmlns:oebs="http://www.rosbank.ru/oebs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.rosbank.ru/oebs oebs.xsd">                                     
  <h:header xmlns:h="http://www.rosbank.ru/oebs/header" xsi:schemaLocation="http://www.rosbank.ru/oebs/header oebs_header_element.xsd">                                                                
    <time>2008-03-17T09:00:00.000000+00:00</time>                                                                                                                                                      
  </h:header>                                                                                                                                                                                          
  <c:content xmlns:c="http://www.rosbank.ru/oebs/content/organization" xsi:schemaLocation="http://www.rosbank.ru/oebs/content/organization oebs_content_organization_element.xsd">                     
    <organization>                                                                                                                                                                                     
      <org_structure_version_id>1</org_structure_version_id>                                                                                                                                           
    </organization>                                                                                                                                                                                    
  </c:content>                                                                                                                                                                                         
</oebs:root>                                                                                                                                                                                           
<oebs:root xmlns:oebs="http://www.rosbank.ru/oebs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.rosbank.ru/oebs oebs.xsd">                                     
  <h:header xmlns:h="http://www.rosbank.ru/oebs/header" xsi:schemaLocation="http://www.rosbank.ru/oebs/header oebs_header_element.xsd">                                                                
    <time>2008-03-17T09:00:00.000000+00:00</time>                                                                                                                                                      
  </h:header>                                                                                                                                                                                          
  <c:content xmlns:c="http://www.rosbank.ru/oebs/content/organization" xsi:schemaLocation="http://www.rosbank.ru/oebs/content/organization oebs_content_organization_element_V2.0.xsd">                
    <organization>                                                                                                                                                                                     
      <org_structure_version_id>1</org_structure_version_id>                                                                                                                                           
    </organization>                                                                                                                                                                                    
  </c:content>                                                                                                                                                                                         
</oebs:root>                                                                                                                                                                                           
Elapsed: 00:00:00.03
SQL> select *
  2    from CONTENT
  3  /
<c:content xmlns:c="http://www.rosbank.ru/oebs/content/organization" xsi:schemaLocation="http://www.rosbank.ru/oebs/content/organization oebs_content_organization_element.xsd">                       
  <organization>                                                                                                                                                                                       
    <org_structure_version_id>1</org_structure_version_id>                                                                                                                                             
  </organization>                                                                                                                                                                                      
</c:content>                                                                                                                                                                                           
<c:content xmlns:c="http://www.rosbank.ru/oebs/content/organization" xsi:schemaLocation="http://www.rosbank.ru/oebs/content/organization oebs_content_organization_element_V2.0.xsd">                  
  <organization>                                                                                                                                                                                       
    <org_structure_version_

Similar Messages

  • Block Inheritance and Default Domain Policy

       Hello to all, I will run a cross-forest migration and target forest has a Default Domain Policy. Target domain is Windows 2003 Functional Level, but has almost all DCs on Windows 2008. As first level OUs represents country codes (USA, GBR, FRA,
    etc) and a new country will be created I want to block GPOs from Domain level. The task itself is very easy, just configure "Block Inheritance" on the new country OU. Important: Default Domain Policy is >> not set << to "Enforce"
    on target domain.
       Question: the security configurations (account, password, local policies) from Default Domain Policy will be blocked? If yes, how domain users below this new country OU will have basic configurations for them (password complexity, password length,
    certificates, etc) ?
       Regards, EEOC.

       Question: the security configurations (account, password, local policies) from Default Domain Policy will be blocked? If yes, how domain users below this new country OU will have basic configurations for them (password complexity, password length,
    certificates, etc) ?
    The Domain security policy for passwords etc, is domain-wide, and cannot be blocked.
    It applies to, and is controlled by, the Domain Controllers.
    Don
    (Please take a moment to "Vote as Helpful" and/or "Mark as Answer", where applicable.
    This helps the community, keeps the forums tidy, and recognises useful contributions. Thanks!)

  • Cant load schema-based xml-file to default table via http/ftp

    Hola,
    we are running ORACLE 10.2.0.3.0 with installed XML-DB.
    HTTP- and ftp-listeners where configured successfully, we are able to register a designed XSD-file within XML-DB. Autogen types and tables where set "true" and default table for root object within xsd and several type objects where also created successful.
    Oracle DB is running on a Linux environment, it is possible to establish a WEBDAV-connection to this machine via my Windows client.
    As far as I understood the Oracle examples, there should be some kind of automatism. Putting a valid (and registered via xsi:noNamespaceSchemaLocation=<pointing to xsd-file>) XML file into my WEBDAV folder should create an XML object in the XML repository AND create a dataset in the default table.
    Last thing doesn´t work.
    Any idea?!

    Can you try this simple example
    SQL> set echo on
    SQL> spool testase.log
    SQL> --
    SQL> connect / as sysdba
    Connected.
    SQL> --
    SQL> set define on
    SQL> set timing on
    SQL> --
    SQL> define USERNAME = OTN
    SQL> --
    SQL> def PASSWORD = &USERNAME
    SQL> --
    SQL> def USER_TABLESPACE = USERS
    SQL> --
    SQL> def TEMP_TABLESPACE = TEMP
    SQL> --
    SQL> drop user &USERNAME cascade
      2  /
    old   1: drop user &USERNAME cascade
    new   1: drop user OTN cascade
    User dropped.
    Elapsed: 00:00:00.18
    SQL> grant create any directory, drop any directory, connect, resource, alter session, create view to &USERNAME identified by &PASSWORD
      2  /
    old   1: grant create any directory, drop any directory, connect, resource, alter session, create view to &USERNAME identified by &PASSWORD
    new   1: grant create any directory, drop any directory, connect, resource, alter session, create view to OTN identified by OTN
    Grant succeeded.
    Elapsed: 00:00:00.09
    SQL> alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
      2  /
    old   1: alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
    new   1: alter user OTN default tablespace USERS temporary tablespace TEMP
    User altered.
    Elapsed: 00:00:00.00
    SQL> connect &USERNAME/&PASSWORD
    Connected.
    SQL> --
    SQL> -- create or replace directory XMLDIR as '&XMLDIR'
    SQL> -- /
    SQL> var SCHEMAURL    varchar2(256)
    SQL> VAR XMLSCHEMA    CLOB;
    SQL> VAR INSTANCE     CLOB;
    SQL> VAR DOCPATH      VARCHAR2(700)
    SQL> --
    SQL> set define off
    SQL> --
    SQL> alter session set events='31098 trace name context forever'
      2  /
    Session altered.
    Elapsed: 00:00:00.01
    SQL> begin
      2    :SCHEMAURL:= 'http://oradb4.min.local:8080/public/CSBF/xsd/CSBF_Vergabemeldung_Formular.xsd';
      3    :XMLSCHEMA :=
      4  '<?xml version="1.0" encoding="UTF-8"?>
      5  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" version="1.0" xdb:storeVarrayAsTable="true">
      6     <xs:simpleType name="string_5">
      7             <xs:restriction base="xs:string"><xs:maxLength value="5"/></xs:restriction>
      8     </xs:simpleType>
      9     <xs:simpleType name="string_6">
    10             <xs:restriction base="xs:string"><xs:maxLength value="6"/></xs:restriction>
    11     </xs:simpleType>
    12     <xs:simpleType name="string_8">
    13             <xs:restriction base="xs:string"><xs:maxLength value="8"/></xs:restriction>
    14     </xs:simpleType>
    15     <xs:simpleType name="string_20">
    16             <xs:restriction base="xs:string"><xs:maxLength value="20"/></xs:restriction>
    17     </xs:simpleType>
    18     <xs:simpleType name="string_30">
    19             <xs:restriction base="xs:string"><xs:maxLength value="30"/></xs:restriction>
    20     </xs:simpleType>
    21     <xs:simpleType name="string_60">
    22             <xs:restriction base="xs:string"><xs:maxLength value="60"/></xs:restriction>
    23     </xs:simpleType>
    24     <xs:element name="CSBF_Vergabemeldung" xdb:defaultTable="CSBF_VERGABE_INFO_XML">
    25             <xs:complexType>
    26                     <xs:sequence>
    27                             <xs:element name="CSBF_Vergabemeldung_Info">
    28                                     <xs:complexType>
    29                                             <xs:sequence>
    30                                                     <xs:element name="Identnummer" type="string_30"/>
    31                                                     <xs:element name="Version_CSBF_Vergabevermerk_Formular" type="string_30"/>
    32                                                     <xs:element name="Fertigstellung_Vergabevermerk" type="xs:date"/>
    33                                             </xs:sequence>
    34                                     </xs:complexType>
    35                             </xs:element>
    36                             <xs:element name="Strassenbaudienststelle">
    37                                     <xs:complexType>
    38                                             <xs:sequence>
    39                                                     <xs:element name="Kennung" type="string_8"/>
    40                                                     <xs:element name="Strassenbau_Organisation_Bezeichnung" type="string_60"/>
    41                                                     <xs:element name="Adresszeile_2" type="string_60" minOccurs="0"/>
    42                                                     <xs:element name="Adresszeile_3" type="string_60" minOccurs="0"/>
    43                                                     <xs:element name="Adresszeile_4" type="string_60" minOccurs="0"/>
    44                                                     <xs:element name="Strasse" type="string_60"/>
    45                                                     <xs:element name="PLZ" type="string_6"/>
    46                                                     <xs:element name="Ort" type="string_60"/>
    47                                                     <xs:element name="NUTS" type="string_5"/>
    48                                                     <xs:element name="Telefon" type="string_20" minOccurs="0"/>
    49                                                     <xs:element name="Fax" type="string_20" minOccurs="0"/>
    50                                                     <xs:element name="E_Mail" type="string_30"/>
    51                                             </xs:sequence>
    52                                     </xs:complexType>
    53                             </xs:element>
    54                     </xs:sequence>
    55             </xs:complexType>
    56     </xs:element>
    57  </xs:schema>';
    58    :DOCPATH := '/public/CSBF_Vergabemeldung.xml';
    59    :INSTANCE :=
    60  '<?xml version="1.0" encoding="ISO-8859-15"?>
    61  <CSBF_Vergabemeldung xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://oradb4.min.local:8080/public/CSBF/xsd/CSBF
    _Vergabemeldung_Formular.xsd">
    62     <CSBF_Vergabemeldung_Info>
    63             <Identnummer>xxxxxxxxxxxxxxxxxxxxxxxxxxxxx</Identnummer>
    64             <Version_CSBF_Vergabevermerk_Formular>xxxxxxxxxxxxxxxx</Version_CSBF_Vergabevermerk_Formular>
    65             <Fertigstellung_Vergabevermerk>1900-01-01</Fertigstellung_Vergabevermerk>
    66     </CSBF_Vergabemeldung_Info>
    67     <Strassenbaudienststelle>
    68             <Kennung>xxxxx</Kennung>
    69             <Strassenbau_Organisation_Bezeichnung>xxxxxxx</Strassenbau_Organisation_Bezeichnung>
    70             <Adresszeile_2>xxxxxxxxxxxxx</Adresszeile_2>
    71             <Adresszeile_3>xxxxxxxxxxxxxx</Adresszeile_3>
    72             <Adresszeile_4>xxxxxxxxxxxxxxxxx</Adresszeile_4>
    73             <Strasse>xxxxxxxxxxxxxx</Strasse>
    74             <PLZ>xxxxx</PLZ>
    75             <Ort>xxxxxxxxxxxxxx</Ort>
    76             <NUTS>xxxxx</NUTS>
    77             <Telefon>xxxxxxxxxxx</Telefon>
    78             <Fax>xxxxxxxxxxx</Fax>
    79             <E_Mail>[email protected]</E_Mail>
    80     </Strassenbaudienststelle>
    81  </CSBF_Vergabemeldung>';
    82  end;
    83  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.01
    SQL> begin
      2    dbms_xmlschema.registerSchema
      3    (
      4      schemaurl       => :SCHEMAURL,
      5      schemadoc       => :XMLSCHEMA,
      6      local           => TRUE,
      7      genTypes        => TRUE,
      8      genBean         => FALSE,
      9      genTables       => TRUE
    10    );
    11  end;
    12  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:03.80
    SQL> desc CSBF_VERGABE_INFO_XML
    Name                                                                                      Null?    Type
    TABLE of SYS.XMLTYPE(XMLSchema "http://oradb4.min.local:8080/public/CSBF/xsd/CSBF_Vergabemeldung_Formular.xsd" Element "CSBF_Vergabemeldung") STORAGE Object-rel
    ational TYPE "CSBF_Vergabemeldung3270_T"
    SQL> --
    SQL> declare
      2    V_RESULT BOOLEAN;
      3  begin
      4     if dbms_xdb.existsResource(:DOCPATH) then
      5       dbms_xdb.deleteResource(:DOCPATH);
      6    end if;
      7    V_RESULT := DBMS_XDB.CREATERESOURCE(:DOCPATH,:INSTANCE);
      8    COMMIT;
      9  end;
    10  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.79
    SQL> select count(*)
      2    from CSBF_VERGABE_INFO_XML
      3  /
             1
    Elapsed: 00:00:00.15
    SQL> set long 10000 pages 0 lines 160
    SQL> --
    SQL> select object_value
      2    from CSBF_VERGABE_INFO_XML
      3  /
    <?xml version="1.0" encoding="WINDOWS-1252"?>
    <CSBF_Vergabemeldung xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://oradb4.min.local:8080/public/CSBF/xsd/CSBF_Verg
    abemeldung_Formular.xsd">
      <CSBF_Vergabemeldung_Info>
        <Identnummer>xxxxxxxxxxxxxxxxxxxxxxxxxxxxx</Identnummer>
        <Version_CSBF_Vergabevermerk_Formular>xxxxxxxxxxxxxxxx</Version_CSBF_Vergabevermerk_Formular>
        <Fertigstellung_Vergabevermerk>1900-01-01</Fertigstellung_Vergabevermerk>
      </CSBF_Vergabemeldung_Info>
      <Strassenbaudienststelle>
        <Kennung>xxxxx</Kennung>
        <Strassenbau_Organisation_Bezeichnung>xxxxxxx</Strassenbau_Organisation_Bezeichnung>
        <Adresszeile_2>xxxxxxxxxxxxx</Adresszeile_2>
        <Adresszeile_3>xxxxxxxxxxxxxx</Adresszeile_3>
        <Adresszeile_4>xxxxxxxxxxxxxxxxx</Adresszeile_4>
        <Strasse>xxxxxxxxxxxxxx</Strasse>
        <PLZ>xxxxx</PLZ>
        <Ort>xxxxxxxxxxxxxx</Ort>
        <NUTS>xxxxx</NUTS>
        <Telefon>xxxxxxxxxxx</Telefon>
        <Fax>xxxxxxxxxxx</Fax>
        <E_Mail>[email protected]</E_Mail>
      </Strassenbaudienststelle>
    </CSBF_Vergabemeldung>
    Elapsed: 00:00:01.99
    SQL> select xdburitype(:DOCPATH).getXML()
      2    from DUAL
      3  /
    <?xml version="1.0" encoding="WINDOWS-1252"?>
    <CSBF_Vergabemeldung xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://oradb4.min.local:8080/public/CSBF/xsd/CSBF_Verg
    abemeldung_Formular.xsd">
      <CSBF_Vergabemeldung_Info>
        <Identnummer>xxxxxxxxxxxxxxxxxxxxxxxxxxxxx</Identnummer>
        <Version_CSBF_Vergabevermerk_Formular>xxxxxxxxxxxxxxxx</Version_CSBF_Vergabevermerk_Formular>
        <Fertigstellung_Vergabevermerk>1900-01-01</Fertigstellung_Vergabevermerk>
      </CSBF_Vergabemeldung_Info>
      <Strassenbaudienststelle>
        <Kennung>xxxxx</Kennung>
        <Strassenbau_Organisation_Bezeichnung>xxxxxxx</Strassenbau_Organisation_Bezeichnung>
        <Adresszeile_2>xxxxxxxxxxxxx</Adresszeile_2>
        <Adresszeile_3>xxxxxxxxxxxxxx</Adresszeile_3>
        <Adresszeile_4>xxxxxxxxxxxxxxxxx</Adresszeile_4>
        <Strasse>xxxxxxxxxxxxxx</Strasse>
        <PLZ>xxxxx</PLZ>
        <Ort>xxxxxxxxxxxxxx</Ort>
        <NUTS>xxxxx</NUTS>
        <Telefon>xxxxxxxxxxx</Telefon>
        <Fax>xxxxxxxxxxx</Fax>
        <E_Mail>[email protected]</E_Mail>
      </Strassenbaudienststelle>
    </CSBF_Vergabemeldung>
    Elapsed: 00:00:00.11
    SQL>

  • Problems with vertical cell borders and the default table style

    When laying out tables in Word, I like to use thin horizontal lines (cell borders) and thick-ish white vertical lines. The vertical white cell borders create a subtle negative space that is less cluttered than the typical boxed-in-all-sides style.
    Issue 1.
    In Pages, horizontal cell borders seem to take precedence over vertical cell borders so my vertical white line trick doesn't work. Is there a way to force my vertical white cell borders to "show up" over my think black horizontal cell borders?
    Issue 2.
    So, for the time being, I'm not using vertical white cell borders in tables; instead, I set the vertical cell borders to "none." Unfortunately, when I try to set the default table style using a table with no vertical cell borders, Pages adds the vertical cell borders anyway. Does anyone know a way to get Pages to surrender?
    Message was edited by: Steve in Seattle

    I must apologizes.
    It seems that I didn't understand well the problem.
    Issue 1.
    In Pages, horizontal cell borders seem to take precedence over vertical cell borders so my vertical white line trick doesn't work. Is there a way to force my vertical white cell borders to "show up" over my think black horizontal cell borders?
    NO
    Issue 2.
    So, for the time being, I'm not using vertical white cell borders in tables; instead, I set the vertical cell borders to "none." Unfortunately, when I try to set the default table style using a table with no vertical cell borders, Pages adds the vertical cell borders anyway. Does anyone know a way to get Pages to surrender?
    I checked and here, aftere defining a new default format with vertical lines set to none, this format is used when I cvreate a new table.
    But the same with horizontal lines doesn't apply.
    _Go to "Provide Pages Feedback" in the "Pages" menu_, describe what you wish.
    Then, cross your fingers, and wait _at least_ for iWork'10
    Yvan KOENIG (from FRANCE mardi 28 avril 2009 22:31:45)

  • Table model and default model

    Hi All,
    can u tell me how to use table model or default table model. where i can references about it???
    thanks for all

    [http://java.sun.com/docs/books/tutorial/uiswing/components/table.html#data]

  • Question regarding Classic and Advance table

    Hi,
    I have classic and advance table. I am populating with VO that brings 100 record. When i render page i see last record being displayed. How can i show my first record by defult on both tables?

    By default the first record will be displayed, if you are seeing the last one instead, you probably did a vo.last() in the code.
    Thanks
    Tapash

  • BAPI FOR Deleting a Schedule Line Item from EKES and EKET tables

    Dear All,
    I would like to for deleting one of the line item from EKES (Po Confirmation ) and the respective line item from the EKET(PO Schedule Line Item Table).
    Assume that am allowing the user to select the lineitem from zprogram screen and collecting the PO and Its LIne Item details in an internal table.
    Can i Use
    <b>BAPI_PO_Change</b> , if so , can anybody tell me the steps to follow to use this bapi for deleting the PO lineItems, since i m going to try BAPI for First time.
    pls help me out
    Message was edited by: Raja K.P

    Hi raja ,
    loop at iekko1.
        w_index = sy-tabix.
        item-po_item   = itemx-po_item   = iekko1-ebelp.
        item-quantity  = iekko1-mng01.
        itemx-quantity = iekko1-mng01.
        if iekko1-wamng = iekko1-wemng.
        itemx-no_more_gr = item-no_more_gr = 'X'.
        else.
        itemx-no_more_gr = item-no_more_gr = ''.
        endif.
        append item.
        append itemx.
          clear return[].
          call function 'BAPI_PO_CHANGE'
               exporting
                    purchaseorder = iekko1-ebeln
               tables
                    return        = return
                    poitem        = item
                    poitemx       = itemx.
          if return[] is initial.
          commit work and wait.
          call function 'DEQUEUE_ALL'.
    search for deletion fields which u have to mark 'X'.
    before calling  this BAPi u have to lock the PO by using ENQUEUE.
    <b>
    FU BAPI_PO_CHANGE
    Text
    Change purchase order
    Functionality
    Function module BAPI_PO_CHANGE enables you to change purchase orders. The Change method uses the technology behind the online transaction ME22N.
    Alternatively, the IDoc type PORDCH1 is available. The data from this IDoc populates the interface parameters of the function module BAPI_PO_CHANGE.
    Functionality in Detail
    Authorization
    When you create (activity 02) an Enjoy purchase order, the following authorization objects are checked:
    M_BEST_BSA (document type in PO)
    M_BEST_EKG (purchasing group in PO)
    M_BEST_EKO (purchasing organization in PO)
    M_BEST_WRK (plant in PO)
    Controlling adoption of field values via X bar
    For most tables, you can use your own parameters in the associated X bar (e.g. PoItemX) to determine whether fields are to be set initial, values inserted via the interface, or default values adopted from Customizing or master records, etc. (for example, it is not mandatory to adopt the material group from an underlying requisition - you can change it with the BAPI).
    Transfer
    Purchase order number
    The PurchaseOrder field uniquely identifies a purchase order. This field must be populated in order to carry out the Change method.
    Header data
    The header data of the Enjoy purchase order is transferred in table PoHeader.
    Item data
    The item data of the Enjoy purchase order is stored in the tables PoItem (general item data). Changes regarding quantity and delivery date are to be made in the table PoSchedule.
    Use the table PoAccount to change the account assignment information.
    Services and limits
    Changes to existing items cannot be carried out with the Change method. It is only possible to create new items.
    Conditions
    Conditions are transferred in the table PoCond; header conditions in the table PoCondHeader. A new price determination process can be initiated via the parameter CALCTYPE in the table PoItem.
    Vendor and delivery address
    The vendor address in the table PoAddrVendor and the delivery address in the table PoAddrDelivery can only be replaced by another address number that already exists in the system (table ADRC). Changes to address details can only be made using the method BAPI_ADDRESSORG_CHANGE.
    Partner roles
    You can change all partners except the partner role "vendor" via the table PoPartner.
    Export/import data
    Export/import data can be specified per item in the table PoExpImpItem. Foreign trade data can only be transferred as default data for new items. Changes to the export/import data of existing items are not possible.
    Texts
    Header and item texts can be transferred in the tables PoTextHeader and PoTextItem. Texts for services are imported in the table PoServicesText. Texts can only be replaced completely.
    Version Management
    You can make use of the Version Management facility via the table AllVersions.
    Return
    If the PO was changed successfully, the header and item tables are populated with the information from the PO.
    Return messages
    Messages are returned in the parameter Return. This also contains information as to whether interface data has been wrongly or probably wrongly (heuristical interface check) populated. If a PO has been successfully created, the PO number is also placed in the return table with the appropriate message.
    Restrictions
    With this function module, it is not possible to:
    Create subcontracting components (you can only use existing ones)
    Create configurations (you can only use existing ones)
    Change message records (table NAST) and additional message data (this data can only be determined via the message determination facility (Customizing))
    Attach documents to the purchase order
    Change foreign trade data
    Change service data
    Change or reexplode BOMs
    A firewall prevents the manipulation of data that is not changeable in Purchasing according to the business logic of the purchase order (e.g. PO number, vendor, etc.).
    PO items with an invoicing plan cannot be created or changed using the BAPIs
    In this connection, please refer to current information in Note 197958.
    To change addresses with numbers from Business Address Services (cantral address management), please use the function module BAPI_ADDRESSORG_CHANGE.
    To change variant configurations, please use the function module BAPI_UI_CHANGE. More information is available in the BAPI Explorer under the Logistics General node.
    In the case of changes that are to be made via the BAPI_PO_CHANGE, a firewall first checks whether the relevant fields are changeable. This approach follows that of the online transaction. Here it is not possible to change the vendor or the document type, for example.
    Example
    Example of changes made to a purchase order with:
    1. Change in header data
    2. Change in item
    3. Change in delivery schedule
    4. Change in account assignment
    5. Change in conditions
    6. Change in partners
    Parameter: PURCHASEORDER 4500049596
    Parameter: POHEADER
    PMNTTRMS = 0002
    PUR_GROUP = 002
    Parameter: POHEADERX
    PMNTTRMS = X
    PUR_GROUP = X
    Parameter: POITEM
    PO_ITEM = 00001
    CONF_CTRL = 0001
    Parameter: POITEMX
    PO_ITEM = 00001
    PO_ITEMX = X
    CONF_CTRL =  X
    Parameter: POSCHEDULE
    PO_ITEM = 00001
    SCHED_LINE = 0001
    QUANTITY = 10.000
    PO_ITEM = 00001
    SCHED_LINE = 0003
    DELETE_IND =  X
    Parameter: POSCHEDULEX
    PO_ITEM =  00001
    SCHED_LINE =  0001
    PO_ITEMX =  X
    SCHED_LINEX =  X
    QUANTITY =  X
    PO_ITEM =  00001
    SCHED_LINE =  0003
    PO_ITEMX =  X
    SCHED_LINEX =  X
    DELETE_IND = X
    Parameter: POACCOUNT
    PO_ITEM = 00001
    SERIAL_NO = 01
    GL_ACCOUNT = 0000400020
    Parameter: POACCOUNTX
    PO_ITEM = 00001
    SERIAL_NO = 01
    PO_ITEMX = X
    SERIAL_NOX = X
    GL_ACCOUNT = X
    Parameter: POCOND
    ITM_NUMBER = 000001
    COND_TYPE = RA02
    COND_VALUE = 2.110000000
    CURRENCY = %
    CHANGE_ID = U
    Parameter: POCONDX
    ITM_NUMBER = 000001
    COND_ST_NO = 001
    ITM_NUMBERX = X
    COND_ST_NOX = X
    COND_TYPE = X
    COND_VALUE = X
    CURRENCY = X
    CHANGE_ID = X
    Parameter: POPARTNER
    PARTNERDESC =  GS
    LANGU =  EN
    BUSPARTNO = 0000001000
    Help in the Case of Problems
    1. Note 197958 lists answers to frequently asked questions (FAQs). (Note 499626 contains answers to FAQs relating to External Services Management.)
    2. If you have detected an error in the function of a BAPI, kindly create a reproducible example in the test data directory in the Function Builder (transaction code SE37). Note 375886 tells you how to do this.
    3. If the problem persists, please create a Customer Problem Message for the componente MM-PUR-PO-BAPI, and document the reproducible example where necessary.
    Customer Enhancements
    The following user exits (function modules) are available for the BAPI BAPI_PO_CREATE1:
    EXIT_SAPL2012_001 (at start of BAPI)
    EXIT_SAPL2012_003 (at end of BAPI)
    The following user exits (function modules) are available for the BAPI BAPI BAPI_PO_CHANGE:
    EXIT_SAPL2012_002 (at start of BAPI)
    EXIT_SAPL2012_004 (at end of BAPI)
    These exits belong to the enhancement SAPL2012 (see also transaction codes SMOD and CMOD).
    There is also the option of populating customer-specific fields for header, item, or account assignment data via the parameter EXTENSIONIN.
    Further Information
    1. Note 197958 contains up-to-date information on the purchase order BAPIs.
    2. If you test the BAPIs BAPI_PO_CREATE1 or BAPI_PO_CHANGE in the Function Builder (transaction code SE37), no database updates will be carried out. If you need this function, please take a look at Note 420646.
    3. The BAPI BAPI_PO_GETDETAIL serves to read the details of a purchase order. The BAPI cannot read all details (e.g. conditions). However, you can use the BAPI BAPI_PO_CHANGE for this purpose if only the document number is populated and the initiator has change authorizations for purchase orders.
    4. Frequently used BAPIs for purchase orders are BAPI_PO_CREATE, BAPI_PO_CREATE1, BAPI_PO_CHANGE, BAPI_PO_GETDETAIL, BAPI_PO_GETITEMS, BAPI_PO_GETITEMSREL, and BAPI_PO_GETRELINFO.
    5. For more information on purchase orders, refer to the SAP library (under MM Purchasing -> Purchase Orders) or the Help for the Enjoy Purchase Order, or choose the path Tools -> ABAP Workbench -> Overview -> BAPI Explorer from the SAP menu.
    Parameters
    PURCHASEORDER
    POHEADER
    POHEADERX
    POADDRVENDOR
    TESTRUN
    MEMORY_UNCOMPLETE
    MEMORY_COMPLETE
    POEXPIMPHEADER
    POEXPIMPHEADERX
    VERSIONS
    NO_MESSAGING
    NO_MESSAGE_REQ
    NO_AUTHORITY
    NO_PRICE_FROM_PO
    EXPHEADER
    EXPPOEXPIMPHEADER
    RETURN
    POITEM
    POITEMX
    POADDRDELIVERY
    POSCHEDULE
    POSCHEDULEX
    POACCOUNT
    POACCOUNTPROFITSEGMENT
    POACCOUNTX
    POCONDHEADER
    POCONDHEADERX
    POCOND
    POCONDX
    POLIMITS
    POCONTRACTLIMITS
    POSERVICES
    POSRVACCESSVALUES
    POSERVICESTEXT
    EXTENSIONIN
    EXTENSIONOUT
    POEXPIMPITEM
    POEXPIMPITEMX
    POTEXTHEADER
    POTEXTITEM
    ALLVERSIONS
    POPARTNER
    Exceptions
    Function Group
    2012
    </b>
    regards
    prabhu
    Message was edited by: Prabhu Peram

  • Poor performance while join of 2 comprehensive large views and small table

    Hi,
    The following SQL statement has been identified to perform poorly. It currently takes up to 6 seconds to execute, but it's supposed to take ~30-40ms at most.
    This is the statement(all bind variables change to numbers):
    SELECT v__96.connector_objectid, v__96.connector_classid, v__96.from_objectid,
           v__96.to_objectid, v__96.from_classid, v__96.to_classid,
           v__96.from_firstunit, v__96.to_firstunit, v__96.number_of_units,
           tmp_trace.first_unit, tmp_trace.last_unit, v__96.inv_status_number,
           tmp_trace.first_unit, tmp_trace.last_unit, v__96.answers,
           v__96.priority, v__97.first_unit, v__97.n_units,
           v__97.mid_span_distance
      FROM ne.tmp_trace,
           (SELECT b.objectid, b.answers, b.connector_classid,
                   b.connector_objectid, b.from_classid, b.from_objectid,
                   b.to_classid, b.to_objectid, b.from_firstunit, b.to_firstunit,
                   b.number_of_units, b.inv_status_number, b.splice_closure_name,
                   b.work_order_name, b.work_order_item_number,
                   b.inventory_status_code, b.priority
              FROM ne.connection b
             WHERE b.objectid NOT IN (
                      SELECT /*+ HASH_AJ */
                             sde_deletes_row_id
                        FROM ne.d96
                       WHERE deleted_at IN (
                                SELECT l.lineage_id
                                  FROM sde.state_lineages l
                                 WHERE l.lineage_name = 2
                                   AND l.lineage_id <= 115)
                         AND sde_state_id = 0)
            UNION ALL
            SELECT a.objectid, a.answers, a.connector_classid,
                   a.connector_objectid, a.from_classid, a.from_objectid,
                   a.to_classid, a.to_objectid, a.from_firstunit, a.to_firstunit,
                   a.number_of_units, a.inv_status_number, a.splice_closure_name,
                   a.work_order_name, a.work_order_item_number,
                   a.inventory_status_code, a.priority
              FROM ne.a96 a, sde.state_lineages sl
             WHERE (a.objectid, a.sde_state_id) NOT IN (
                      SELECT /*+ HASH_AJ */
                             sde_deletes_row_id, sde_state_id
                        FROM ne.d96
                       WHERE deleted_at IN (
                                SELECT l.lineage_id
                                  FROM sde.state_lineages l
                                 WHERE l.lineage_name = 2
                                   AND l.lineage_id <= 115)
                         AND sde_state_id > 0)
               AND a.sde_state_id = sl.lineage_id
               AND sl.lineage_name = 2
               AND sl.lineage_id <= 115) v__96,
           (SELECT b.objectid, b.tray_number, b.db_loss, b.first_unit, b.n_units,
                   b.connection_objectid, b.connector_type_name,
                   b.dedicated_status, b.mid_span_distance
              FROM ne.connection_attributes b
             WHERE b.objectid NOT IN (
                      SELECT /*+ HASH_AJ */
                             sde_deletes_row_id
                        FROM ne.d97
                       WHERE deleted_at IN (
                                SELECT l.lineage_id
                                  FROM sde.state_lineages l
                                 WHERE l.lineage_name = 2
                                   AND l.lineage_id <= 115)
                         AND sde_state_id = 0)
            UNION ALL
            SELECT a.objectid, a.tray_number, a.db_loss, a.first_unit, a.n_units,
                   a.connection_objectid, a.connector_type_name,
                   a.dedicated_status, a.mid_span_distance
              FROM ne.a97 a, sde.state_lineages sl
             WHERE (a.objectid, a.sde_state_id) NOT IN (
                      SELECT /*+ HASH_AJ */
                             sde_deletes_row_id, sde_state_id
                        FROM ne.d97
                       WHERE deleted_at IN (
                                SELECT l.lineage_id
                                  FROM sde.state_lineages l
                                 WHERE l.lineage_name = 2
                                   AND l.lineage_id <= 115)
                         AND sde_state_id > 0)
               AND a.sde_state_id = sl.lineage_id
               AND sl.lineage_name = 2
               AND sl.lineage_id <= 115) v__97
    WHERE (    (    (    (    (   (    ne.tmp_trace.equipment_object_id =
                                                                 v__96.to_objectid
                                    AND v__96.to_classid = 9
                                OR (    ne.tmp_trace.transmedia_object_id =
                                                                 v__96.to_objectid
                                    AND v__96.to_classid = 5
                           AND (   (v__96.to_firstunit
                                       BETWEEN ne.tmp_trace.first_unit
                                           AND ne.tmp_trace.last_unit
                                OR (ne.tmp_trace.first_unit
                                       BETWEEN v__96.to_firstunit
                                           AND   v__96.to_firstunit
                                               + v__96.number_of_units
                                               - 1
                      AND v__96.answers = 0
                 AND v__96.objectid = v__97.connection_objectid
            AND (ne.tmp_trace.session_id = -1234)
           );It should return many values from 2 comprehensive views (v__96, v__97) and business table (tmp_trace). 2 comprehensive views ~1,000,000 recs each, business table ~ 10 recs.
    The version of the database is 11.1.0.6.
    These are the parameters relevant to the optimizer:
    SQL> show parameter optimizer
    NAME                                 TYPE                             VALUE
    optimizer_capture_sql_plan_baselines boolean                          FALSE
    optimizer_dynamic_sampling           integer                          2
    optimizer_features_enable            string                           11.1.0.6
    optimizer_index_caching              integer                          0
    optimizer_index_cost_adj             integer                          100
    optimizer_mode                       string                           ALL_ROWS
    optimizer_secure_view_merging        boolean                          TRUE
    optimizer_use_invisible_indexes      boolean                          FALSE
    optimizer_use_pending_statistics     boolean                          FALSE
    optimizer_use_sql_plan_baselines     boolean                          TRUE
    SQL> show parameter db_file_multi
    NAME                                 TYPE                             VALUE
    db_file_multiblock_read_count        integer                          128
    SQL> show parameter db_block_size
    NAME                                 TYPE                             VALUE
    db_block_size                        integer                          8192
    SQL> show parameter cursor_sharing
    NAME                                 TYPE                             VALUE
    cursor_sharing                       string                           FORCE
    SQL> column sname format a20
    SQL> column pname format a20
    SQL> column pval2 format a20
    SQL> select sname, pname, pval1, pval2 from sys.aux_stats$;
    SNAME                PNAME                     PVAL1 PVAL2
    SYSSTATS_INFO        STATUS                          COMPLETED
    SYSSTATS_INFO        DSTART                          07-15-2009 10:27
    SYSSTATS_INFO        DSTOP                           07-15-2009 10:27
    SYSSTATS_INFO        FLAGS                         1
    SYSSTATS_MAIN        CPUSPEEDNW           1812.32129
    SYSSTATS_MAIN        IOSEEKTIM                    10
    SYSSTATS_MAIN        IOTFRSPEED                 4096
    SYSSTATS_MAIN        SREADTIM
    SYSSTATS_MAIN        MREADTIM
    SYSSTATS_MAIN        CPUSPEED
    SYSSTATS_MAIN        MBRC
    SNAME                PNAME                     PVAL1 PVAL2
    SYSSTATS_MAIN        MAXTHR
    SYSSTATS_MAIN        SLAVETHR
    13 rows selected.Here is the output of EXPLAIN PLAN:
    explain plan for -- statement above
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 1005186751
    | Id  | Operation                          | Name                  | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                   |                       |     1 |   282 |   268   (2)| 00:00:04 |
    |   1 |  NESTED LOOPS                      |                       |     1 |   282 |   268   (2)| 00:00:04 |
    |   2 |   MERGE JOIN CARTESIAN             |                       |     1 |   119 |   260   (1)| 00:00:04 |
    |*  3 |    TABLE ACCESS FULL               | TMP_TRACE             |     1 |    65 |     2   (0)| 00:00:01 |
    |   4 |    BUFFER SORT                     |                       |   103K|  5467K|   258   (1)| 00:00:04 |
    |   5 |     VIEW                           |                       |   103K|  5467K|   258   (1)| 00:00:04 |
    |   6 |      UNION-ALL                     |                       |       |       |            |       |
    |   7 |       NESTED LOOPS ANTI            |                       |     1 |    82 |     3   (0)| 00:00:01 |
    |   8 |        TABLE ACCESS FULL           | CONNECTION_ATTRIBUTES |     1 |    78 |     2   (0)| 00:00:01 |
    |   9 |        VIEW PUSHED PREDICATE       | VW_NSO_1              |     1 |     4 |     1   (0)| 00:00:01 |
    |  10 |         NESTED LOOPS               |                       |     1 |    20 |     1   (0)| 00:00:01 |
    |* 11 |          INDEX RANGE SCAN          | LINEAGES_PK           |     5 |    35 |     1   (0)| 00:00:01 |
    |* 12 |          INDEX UNIQUE SCAN         | D97_PK                |     1 |    13 |     0   (0)| 00:00:01 |
    |* 13 |       HASH JOIN RIGHT ANTI         |                       |   103K|  5568K|   255   (1)| 00:00:04 |
    |  14 |        VIEW                        | VW_NSO_2              |     1 |    26 |     2   (0)| 00:00:01 |
    |  15 |         NESTED LOOPS               |                       |     1 |    20 |     2   (0)| 00:00:01 |
    |* 16 |          INDEX FAST FULL SCAN      | D97_PK                |     1 |    13 |     2   (0)| 00:00:01 |
    |* 17 |          INDEX UNIQUE SCAN         | LINEAGES_PK           |     1 |     7 |     0   (0)| 00:00:01 |
    |  18 |        NESTED LOOPS                |                       |       |       |            |       |
    |  19 |         NESTED LOOPS               |                       |   103K|  2936K|   252   (1)| 00:00:04 |
    |* 20 |          INDEX RANGE SCAN          | LINEAGES_PK           |     5 |    35 |     1   (0)| 00:00:01 |
    |* 21 |          INDEX RANGE SCAN          | A97_STATEID_IX1       | 17731 |       |    32   (0)| 00:00:01 |
    |  22 |         TABLE ACCESS BY INDEX ROWID| A97                   | 21491 |   461K|   123   (1)| 00:00:02 |
    |* 23 |   VIEW                             |                       |     1 |   163 |     8  (13)| 00:00:01 |
    |  24 |    UNION ALL PUSHED PREDICATE      |                       |       |       |            |       |
    |  25 |     NESTED LOOPS ANTI              |                       |     1 |   185 |     1   (0)| 00:00:01 |
    |* 26 |      TABLE ACCESS BY INDEX ROWID   | CONNECTION            |     1 |   181 |     0   (0)| 00:00:01 |
    |* 27 |       INDEX UNIQUE SCAN            | R96_SDE_ROWID_UK      |     1 |       |     0   (0)| 00:00:01 |
    |  28 |      VIEW PUSHED PREDICATE         | VW_NSO_3              |     1 |     4 |     1   (0)| 00:00:01 |
    |  29 |       NESTED LOOPS                 |                       |     1 |    20 |     1   (0)| 00:00:01 |
    |* 30 |        INDEX RANGE SCAN            | LINEAGES_PK           |     5 |    35 |     1   (0)| 00:00:01 |
    |* 31 |        INDEX UNIQUE SCAN           | D96_PK                |     1 |    13 |     0   (0)| 00:00:01 |
    |* 32 |     HASH JOIN ANTI                 |                       |     1 |    97 |     7  (15)| 00:00:01 |
    |  33 |      NESTED LOOPS                  |                       |     1 |    71 |     4   (0)| 00:00:01 |
    |* 34 |       TABLE ACCESS BY INDEX ROWID  | A96                   |     1 |    64 |     4   (0)| 00:00:01 |
    |* 35 |        INDEX RANGE SCAN            | A96_PK                |     1 |       |     3   (0)| 00:00:01 |
    |* 36 |       INDEX UNIQUE SCAN            | LINEAGES_PK           |     1 |     7 |     0   (0)| 00:00:01 |
    |  37 |      VIEW                          | VW_NSO_4              |     1 |    26 |     2   (0)| 00:00:01 |
    |  38 |       NESTED LOOPS                 |                       |     1 |    20 |     2   (0)| 00:00:01 |
    |* 39 |        INDEX FAST FULL SCAN        | D96_PK                |     1 |    13 |     2   (0)| 00:00:01 |
    |* 40 |        INDEX UNIQUE SCAN           | LINEAGES_PK           |     1 |     7 |     0   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       3 - filter("TMP_TRACE"."SESSION_ID"=(-1234))
      11 - access("L"."LINEAGE_NAME"=2 AND "L"."LINEAGE_ID"<=115)
      12 - access("DELETED_AT"="L"."LINEAGE_ID" AND "SDE_DELETES_ROW_ID"="B"."OBJECTID" AND
                  "SDE_STATE_ID"=0)
           filter("DELETED_AT"<=115)
      13 - access("A"."OBJECTID"="SDE_DELETES_ROW_ID" AND "A"."SDE_STATE_ID"="SDE_STATE_ID")
      16 - filter("DELETED_AT"<=115 AND "SDE_STATE_ID"<=115 AND "SDE_STATE_ID">0)
      17 - access("L"."LINEAGE_NAME"=2 AND "DELETED_AT"="L"."LINEAGE_ID")
           filter("L"."LINEAGE_ID"<=115)
      20 - access("SL"."LINEAGE_NAME"=2 AND "SL"."LINEAGE_ID"<=115)
      21 - access("A"."SDE_STATE_ID"="SL"."LINEAGE_ID")
           filter("A"."SDE_STATE_ID"<=115)
      23 - filter(("TMP_TRACE"."EQUIPMENT_OBJECT_ID"="V__96"."TO_OBJECTID" AND "V__96"."TO_CLASSID"=9
                  OR "TMP_TRACE"."TRANSMEDIA_OBJECT_ID"="V__96"."TO_OBJECTID" AND "V__96"."TO_CLASSID"=5) AND
                  ("V__96"."TO_FIRSTUNIT">="TMP_TRACE"."FIRST_UNIT" AND
                  "V__96"."TO_FIRSTUNIT"<="TMP_TRACE"."LAST_UNIT" OR "TMP_TRACE"."FIRST_UNIT">="V__96"."TO_FIRSTUNIT"
                  AND "TMP_TRACE"."FIRST_UNIT"<="V__96"."TO_FIRSTUNIT"+"V__96"."NUMBER_OF_UNITS"-1))
      26 - filter("B"."ANSWERS"=0)
      27 - access("B"."OBJECTID"="V__97"."CONNECTION_OBJECTID")
      30 - access("L"."LINEAGE_NAME"=2 AND "L"."LINEAGE_ID"<=115)
      31 - access("DELETED_AT"="L"."LINEAGE_ID" AND "SDE_DELETES_ROW_ID"="B"."OBJECTID" AND
                  "SDE_STATE_ID"=0)
           filter("DELETED_AT"<=115)
      32 - access("A"."OBJECTID"="SDE_DELETES_ROW_ID" AND "A"."SDE_STATE_ID"="SDE_STATE_ID")
      34 - filter("A"."ANSWERS"=0)
      35 - access("A"."OBJECTID"="V__97"."CONNECTION_OBJECTID" AND "A"."SDE_STATE_ID"<=115)
      36 - access("SL"."LINEAGE_NAME"=2 AND "A"."SDE_STATE_ID"="SL"."LINEAGE_ID")
           filter("SL"."LINEAGE_ID"<=115)
      39 - filter("DELETED_AT"<=115 AND "SDE_STATE_ID"<=115 AND
                  "SDE_DELETES_ROW_ID"="V__97"."CONNECTION_OBJECTID" AND "SDE_STATE_ID">0)
      40 - access("L"."LINEAGE_NAME"=2 AND "DELETED_AT"="L"."LINEAGE_ID")
           filter("L"."LINEAGE_ID"<=115)
    Note
       - dynamic sampling used for this statement
    87 rows selected.Here is the output of SQL*Plus AUTOTRACE including the TIMING information:
    SQL> set autotrace traceonly arraysize 100
    Elapsed: 00:00:01.64
    Execution Plan
    Plan hash value: 1198408274
    | Id  | Operation                          | Name                  | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                   |                       |   876K|   238M|  1301   (2)| 00:00:16 |
    |   1 |  CONCATENATION                     |                       |       |       |            |       |
    |*  2 |   HASH JOIN                        |                       |   438K|   119M|   651   (2)| 00:00:08 |
    |*  3 |    HASH JOIN                       |                       |   423 | 98559 |   390   (2)| 00:00:05 |
    |*  4 |     TABLE ACCESS FULL              | TMP_TRACE             |    82 |  5330 |    29   (0)| 00:00:01 |
    |*  5 |     VIEW                           |                       |   103K|    16M|   360   (1)| 00:00:05 |
    |   6 |      UNION-ALL                     |                       |       |       |            |       |
    |   7 |       NESTED LOOPS ANTI            |                       |     1 |   185 |     3   (0)| 00:00:01 |
    |*  8 |        TABLE ACCESS FULL           | CONNECTION            |     1 |   181 |     2   (0)| 00:00:01 |
    |   9 |        VIEW PUSHED PREDICATE       | VW_NSO_3              |     1 |     4 |     1   (0)| 00:00:01 |
    |  10 |         NESTED LOOPS               |                       |     1 |    20 |     1   (0)| 00:00:01 |
    |* 11 |          INDEX RANGE SCAN          | LINEAGES_PK           |     5 |    35 |     1   (0)| 00:00:01 |
    |* 12 |          INDEX UNIQUE SCAN         | D96_PK                |     1 |    13 |     0   (0)| 00:00:01 |
    |* 13 |       HASH JOIN RIGHT ANTI         |                       |   103K|  9820K|   357   (1)| 00:00:05 |
    |  14 |        VIEW                        | VW_NSO_4              |     1 |    26 |     2   (0)| 00:00:01 |
    |  15 |         NESTED LOOPS               |                       |     1 |    20 |     2   (0)| 00:00:01 |
    |* 16 |          INDEX FAST FULL SCAN      | D96_PK                |     1 |    13 |     2   (0)| 00:00:01 |
    |* 17 |          INDEX UNIQUE SCAN         | LINEAGES_PK           |     1 |     7 |     0   (0)| 00:00:01 |
    |  18 |        NESTED LOOPS                |                       |       |       |            |       |
    |  19 |         NESTED LOOPS               |                       |   103K|  7188K|   354   (1)| 00:00:05 |
    |* 20 |          INDEX RANGE SCAN          | LINEAGES_PK           |     5 |    35 |     1   (0)| 00:00:01 |
    |* 21 |          INDEX RANGE SCAN          | A96_STATEID_IX1       | 17731 |       |    32   (0)| 00:00:01 |
    |* 22 |         TABLE ACCESS BY INDEX ROWID| A96                   | 21491 |  1343K|   224   (1)| 00:00:03 |
    |  23 |    VIEW                            |                       |   103K|  5264K|   258   (1)| 00:00:04 |
    |  24 |     UNION-ALL                      |                       |       |       |            |       |
    |  25 |      NESTED LOOPS ANTI             |                       |     1 |    82 |     3   (0)| 00:00:01 |
    |  26 |       TABLE ACCESS FULL            | CONNECTION_ATTRIBUTES |     1 |    78 |     2   (0)| 00:00:01 |
    |  27 |       VIEW PUSHED PREDICATE        | VW_NSO_1              |     1 |     4 |     1   (0)| 00:00:01 |
    |  28 |        NESTED LOOPS                |                       |     1 |    20 |     1   (0)| 00:00:01 |
    |* 29 |         INDEX RANGE SCAN           | LINEAGES_PK           |     5 |    35 |     1   (0)| 00:00:01 |
    |* 30 |         INDEX UNIQUE SCAN          | D97_PK                |     1 |    13 |     0   (0)| 00:00:01 |
    |* 31 |      HASH JOIN RIGHT ANTI          |                       |   103K|  5568K|   255   (1)| 00:00:04 |
    |  32 |       VIEW                         | VW_NSO_2              |     1 |    26 |     2   (0)| 00:00:01 |
    |  33 |        NESTED LOOPS                |                       |     1 |    20 |     2   (0)| 00:00:01 |
    |* 34 |         INDEX FAST FULL SCAN       | D97_PK                |     1 |    13 |     2   (0)| 00:00:01 |
    |* 35 |         INDEX UNIQUE SCAN          | LINEAGES_PK           |     1 |     7 |     0   (0)| 00:00:01 |
    |  36 |       NESTED LOOPS                 |                       |       |       |            |       |
    |  37 |        NESTED LOOPS                |                       |   103K|  2936K|   252   (1)| 00:00:04 |
    |* 38 |         INDEX RANGE SCAN           | LINEAGES_PK           |     5 |    35 |     1   (0)| 00:00:01 |
    |* 39 |         INDEX RANGE SCAN           | A97_STATEID_IX1       | 17731 |       |    32   (0)| 00:00:01 |
    |  40 |        TABLE ACCESS BY INDEX ROWID | A97                   | 21491 |   461K|   123   (1)| 00:00:02 |
    |* 41 |   HASH JOIN                        |                       |   438K|   119M|   651   (2)| 00:00:08 |
    |* 42 |    HASH JOIN                       |                       |   423 | 98559 |   390   (2)| 00:00:05 |
    |* 43 |     TABLE ACCESS FULL              | TMP_TRACE             |    82 |  5330 |    29   (0)| 00:00:01 |
    |* 44 |     VIEW                           |                       |   103K|    16M|   360   (1)| 00:00:05 |
    |  45 |      UNION-ALL                     |                       |       |       |            |       |
    |  46 |       NESTED LOOPS ANTI            |                       |     1 |   185 |     3   (0)| 00:00:01 |
    |* 47 |        TABLE ACCESS FULL           | CONNECTION            |     1 |   181 |     2   (0)| 00:00:01 |
    |  48 |        VIEW PUSHED PREDICATE       | VW_NSO_3              |     1 |     4 |     1   (0)| 00:00:01 |
    |  49 |         NESTED LOOPS               |                       |     1 |    20 |     1   (0)| 00:00:01 |
    |* 50 |          INDEX RANGE SCAN          | LINEAGES_PK           |     5 |    35 |     1   (0)| 00:00:01 |
    |* 51 |          INDEX UNIQUE SCAN         | D96_PK                |     1 |    13 |     0   (0)| 00:00:01 |
    |* 52 |       HASH JOIN RIGHT ANTI         |                       |   103K|  9820K|   357   (1)| 00:00:05 |
    |  53 |        VIEW                        | VW_NSO_4              |     1 |    26 |     2   (0)| 00:00:01 |
    |  54 |         NESTED LOOPS               |                       |     1 |    20 |     2   (0)| 00:00:01 |
    |* 55 |          INDEX FAST FULL SCAN      | D96_PK                |     1 |    13 |     2   (0)| 00:00:01 |
    |* 56 |          INDEX UNIQUE SCAN         | LINEAGES_PK           |     1 |     7 |     0   (0)| 00:00:01 |
    |  57 |        NESTED LOOPS                |                       |       |       |            |       |
    |  58 |         NESTED LOOPS               |                       |   103K|  7188K|   354   (1)| 00:00:05 |
    |* 59 |          INDEX RANGE SCAN          | LINEAGES_PK           |     5 |    35 |     1   (0)| 00:00:01 |
    |* 60 |          INDEX RANGE SCAN          | A96_STATEID_IX1       | 17731 |       |    32   (0)| 00:00:01 |
    |* 61 |         TABLE ACCESS BY INDEX ROWID| A96                   | 21491 |  1343K|   224   (1)| 00:00:03 |
    |  62 |    VIEW                            |                       |   103K|  5264K|   258   (1)| 00:00:04 |
    |  63 |     UNION-ALL                      |                       |       |       |            |       |
    |  64 |      NESTED LOOPS ANTI             |                       |     1 |    82 |     3   (0)| 00:00:01 |
    |  65 |       TABLE ACCESS FULL            | CONNECTION_ATTRIBUTES |     1 |    78 |     2   (0)| 00:00:01 |
    |  66 |       VIEW PUSHED PREDICATE        | VW_NSO_1              |     1 |     4 |     1   (0)| 00:00:01 |
    |  67 |        NESTED LOOPS                |                       |     1 |    20 |     1   (0)| 00:00:01 |
    |* 68 |         INDEX RANGE SCAN           | LINEAGES_PK           |     5 |    35 |     1   (0)| 00:00:01 |
    |* 69 |         INDEX UNIQUE SCAN          | D97_PK                |     1 |    13 |     0   (0)| 00:00:01 |
    |* 70 |      HASH JOIN RIGHT ANTI          |                       |   103K|  5568K|   255   (1)| 00:00:04 |
    |  71 |       VIEW                         | VW_NSO_2              |     1 |    26 |     2   (0)| 00:00:01 |
    |  72 |        NESTED LOOPS                |                       |     1 |    20 |     2   (0)| 00:00:01 |
    |* 73 |         INDEX FAST FULL SCAN       | D97_PK                |     1 |    13 |     2   (0)| 00:00:01 |
    |* 74 |         INDEX UNIQUE SCAN          | LINEAGES_PK           |     1 |     7 |     0   (0)| 00:00:01 |
    |  75 |       NESTED LOOPS                 |                       |       |       |            |       |
    |  76 |        NESTED LOOPS                |                       |   103K|  2936K|   252   (1)| 00:00:04 |
    |* 77 |         INDEX RANGE SCAN           | LINEAGES_PK           |     5 |    35 |     1   (0)| 00:00:01 |
    |* 78 |         INDEX RANGE SCAN           | A97_STATEID_IX1       | 17731 |       |    32   (0)| 00:00:01 |
    |  79 |        TABLE ACCESS BY INDEX ROWID | A97                   | 21491 |   461K|   123   (1)| 00:00:02 |
    Predicate Information (identified by operation id):
       2 - access("V__96"."OBJECTID"="V__97"."CONNECTION_OBJECTID")
       3 - access("TMP_TRACE"."TRANSMEDIA_OBJECT_ID"="V__96"."TO_OBJECTID")
           filter("V__96"."TO_FIRSTUNIT">="TMP_TRACE"."FIRST_UNIT" AND
                  "V__96"."TO_FIRSTUNIT"<="TMP_TRACE"."LAST_UNIT" OR "TMP_TRACE"."FIRST_UNIT">="V__96"."TO_FIRSTUNIT"
                  AND "TMP_TRACE"."FIRST_UNIT"<="V__96"."TO_FIRSTUNIT"+"V__96"."NUMBER_OF_UNITS"-1)
       4 - filter("TMP_TRACE"."SESSION_ID"=(-1234))
       5 - filter("V__96"."TO_CLASSID"=5)
       8 - filter("B"."ANSWERS"=0)
      11 - access("L"."LINEAGE_NAME"=2 AND "L"."LINEAGE_ID"<=115)
      12 - access("DELETED_AT"="L"."LINEAGE_ID" AND "SDE_DELETES_ROW_ID"="B"."OBJECTID" AND
                  "SDE_STATE_ID"=0)
           filter("DELETED_AT"<=115)
      13 - access("A"."OBJECTID"="SDE_DELETES_ROW_ID" AND "A"."SDE_STATE_ID"="SDE_STATE_ID")
      16 - filter("DELETED_AT"<=115 AND "SDE_STATE_ID"<=115 AND "SDE_STATE_ID">0)
      17 - access("L"."LINEAGE_NAME"=2 AND "DELETED_AT"="L"."LINEAGE_ID")
           filter("L"."LINEAGE_ID"<=115)
      20 - access("SL"."LINEAGE_NAME"=2 AND "SL"."LINEAGE_ID"<=115)
      21 - access("A"."SDE_STATE_ID"="SL"."LINEAGE_ID")
           filter("A"."SDE_STATE_ID"<=115)
      22 - filter("A"."ANSWERS"=0)
      29 - access("L"."LINEAGE_NAME"=2 AND "L"."LINEAGE_ID"<=115)
      30 - access("DELETED_AT"="L"."LINEAGE_ID" AND "SDE_DELETES_ROW_ID"="B"."OBJECTID" AND
                  "SDE_STATE_ID"=0)
           filter("DELETED_AT"<=115)
      31 - access("A"."OBJECTID"="SDE_DELETES_ROW_ID" AND "A"."SDE_STATE_ID"="SDE_STATE_ID")
      34 - filter("DELETED_AT"<=115 AND "SDE_STATE_ID"<=115 AND "SDE_STATE_ID">0)
      35 - access("L"."LINEAGE_NAME"=2 AND "DELETED_AT"="L"."LINEAGE_ID")
           filter("L"."LINEAGE_ID"<=115)
      38 - access("SL"."LINEAGE_NAME"=2 AND "SL"."LINEAGE_ID"<=115)
      39 - access("A"."SDE_STATE_ID"="SL"."LINEAGE_ID")
           filter("A"."SDE_STATE_ID"<=115)
      41 - access("V__96"."OBJECTID"="V__97"."CONNECTION_OBJECTID")
      42 - access("TMP_TRACE"."EQUIPMENT_OBJECT_ID"="V__96"."TO_OBJECTID")
           filter((LNNVL("TMP_TRACE"."TRANSMEDIA_OBJECT_ID"="V__96"."TO_OBJECTID") OR
                  LNNVL("V__96"."TO_CLASSID"=5)) AND ("V__96"."TO_FIRSTUNIT">="TMP_TRACE"."FIRST_UNIT" AND
                  "V__96"."TO_FIRSTUNIT"<="TMP_TRACE"."LAST_UNIT" OR "TMP_TRACE"."FIRST_UNIT">="V__96"."TO_FIRSTUNIT"
                  AND "TMP_TRACE"."FIRST_UNIT"<="V__96"."TO_FIRSTUNIT"+"V__96"."NUMBER_OF_UNITS"-1))
      43 - filter("TMP_TRACE"."SESSION_ID"=(-1234))
      44 - filter("V__96"."TO_CLASSID"=9)
      47 - filter("B"."ANSWERS"=0)
      50 - access("L"."LINEAGE_NAME"=2 AND "L"."LINEAGE_ID"<=115)
      51 - access("DELETED_AT"="L"."LINEAGE_ID" AND "SDE_DELETES_ROW_ID"="B"."OBJECTID" AND
                  "SDE_STATE_ID"=0)
           filter("DELETED_AT"<=115)
      52 - access("A"."OBJECTID"="SDE_DELETES_ROW_ID" AND "A"."SDE_STATE_ID"="SDE_STATE_ID")
      55 - filter("DELETED_AT"<=115 AND "SDE_STATE_ID"<=115 AND "SDE_STATE_ID">0)
      56 - access("L"."LINEAGE_NAME"=2 AND "DELETED_AT"="L"."LINEAGE_ID")
           filter("L"."LINEAGE_ID"<=115)
      59 - access("SL"."LINEAGE_NAME"=2 AND "SL"."LINEAGE_ID"<=115)
      60 - access("A"."SDE_STATE_ID"="SL"."LINEAGE_ID")
           filter("A"."SDE_STATE_ID"<=115)
      61 - filter("A"."ANSWERS"=0)
      68 - access("L"."LINEAGE_NAME"=2 AND "L"."LINEAGE_ID"<=115)
      69 - access("DELETED_AT"="L"."LINEAGE_ID" AND "SDE_DELETES_ROW_ID"="B"."OBJECTID" AND
                  "SDE_STATE_ID"=0)
           filter("DELETED_AT"<=115)
      70 - access("A"."OBJECTID"="SDE_DELETES_ROW_ID" AND "A"."SDE_STATE_ID"="SDE_STATE_ID")
      73 - filter("DELETED_AT"<=115 AND "SDE_STATE_ID"<=115 AND "SDE_STATE_ID">0)
      74 - access("L"."LINEAGE_NAME"=2 AND "DELETED_AT"="L"."LINEAGE_ID")
           filter("L"."LINEAGE_ID"<=115)
      77 - access("SL"."LINEAGE_NAME"=2 AND "SL"."LINEAGE_ID"<=115)
      78 - access("A"."SDE_STATE_ID"="SL"."LINEAGE_ID")
           filter("A"."SDE_STATE_ID"<=115)
    Note
       - dynamic sampling used for this statementThe TKPROF output for this statement looks like the following:
    TKPROF: Release 11.1.0.6.0 - Production on Thu Sep 24 09:30:01 2009
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    Trace file: pro                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           &

    The TKPROF output for this statement looks like the following:
    TKPROF: Release 11.1.0.6.0 - Production on Thu Sep 24 09:30:01 2009
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    Trace file: problem.trc
    Sort options: default
    count    = number of times OCI procedure was executed
    cpu      = cpu time in seconds executing
    elapsed  = elapsed time in seconds executing
    disk     = number of physical reads of buffers from disk
    query    = number of buffers gotten for consistent read
    current  = number of buffers gotten in current mode (usually for update)
    rows     = number of rows processed by the fetch or execute call
    SELECT  V__96.CONNECTOR_OBJECTID,  V__96.CONNECTOR_CLASSID,  V__96.FROM_OBJECTID,  V__96.TO_OBJECTID,  V__96.FROM_CLASSID,  V__96.TO_CLASSID, 
    V__96.FROM_FIRSTUNIT,  V__96.TO_FIRSTUNIT,  V__96.NUMBER_OF_UNITS,  TMP_TRACE.FIRST_UNIT,  TMP_TRACE.LAST_UNIT,  V__96.INV_STATUS_NUMBER, 
    TMP_TRACE.FIRST_UNIT,  TMP_TRACE.LAST_UNIT,  V__96.ANSWERS,  V__96.PRIORITY,  V__97.FIRST_UNIT,  V__97.N_UNITS,  V__97.MID_SPAN_DISTANCE  FROM 
    NE.TMP_TRACE,(SELECT
    b.OBJECTID,b.ANSWERS,b.CONNECTOR_CLASSID,b.CONNECTOR_OBJECTID,b.FROM_CLASSID,b.FROM_OBJECTID,b.TO_CLASSID,b.TO_OBJECTID,b.FROM_FIRSTUNIT,b.TO_FIRSTUNIT,b.NUM
    BER_OF_UNITS,b.INV_STATUS_NUMBER,b.SPLICE_CLOSURE_NAME,b.WORK_ORDER_NAME,b.WORK_ORDER_ITEM_NUMBER,b.INVENTORY_STATUS_CODE,b.PRIORITY  FROM NE.connection b
    WHERE b.OBJECTID NOT IN (SELECT /*+ HASH_AJ */ SDE_DELETES_ROW_ID FROM NE.D96 WHERE DELETED_AT IN (SELECT l.lineage_id FROM SDE.state_lineages l WHERE
    l.lineage_name = :"SYS_B_00" AND l.lineage_id <= :"SYS_B_01") AND SDE_STATE_ID = :"SYS_B_02") UNION ALL SELECT
    a.OBJECTID,a.ANSWERS,a.CONNECTOR_CLASSID,a.CONNECTOR_OBJECTID,a.FROM_CLASSID,a.FROM_OBJECTID,a.TO_CLASSID,a.TO_OBJECTID,a.FROM_FIRSTUNIT,a.TO_FIRSTUNIT,a.NUM
    BER_OF_UNITS,a.INV_STATUS_NUMBER,a.SPLICE_CLOSURE_NAME,a.WORK_ORDER_NAME,a.WORK_ORDER_ITEM_NUMBER,a.INVENTORY_STATUS_CODE,a.PRIORITY  FROM NE.A96
    a,SDE.state_lineages SL WHERE (a.OBJECTID, a.SDE_STATE_ID) NOT IN (SELECT /*+ HASH_AJ */ SDE_DELETES_ROW_ID,SDE_STATE_ID  FROM NE.D96 WHERE DELETED_AT IN
    (SELECT l.lineage_id FROM SDE.state_lineages l WHERE l.lineage_name = :"SYS_B_03" AND l.lineage_id <= :"SYS_B_04") AND SDE_STATE_ID > :"SYS_B_05") AND
    a.SDE_STATE_ID = SL.lineage_id AND SL.lineage_name = :"SYS_B_06" AND SL.lineage_id <= :"SYS_B_07") V__96,(SELECT
    b.OBJECTID,b.TRAY_NUMBER,b.DB_LOSS,b.FIRST_UNIT,b.N_UNITS,b.CONNECTION_OBJECTID,b.CONNECTOR_TYPE_NAME,b.DEDICATED_STATUS,b.MID_SPAN_DISTANCE  FROM
    NE.connection_attributes b WHERE b.OBJECTID NOT IN (SELECT /*+ HASH_AJ */ SDE_DELETES_ROW_ID FROM NE.D97 WHERE DELETED_AT IN (SELECT l.lineage_id FROM
    SDE.state_lineages l WHERE l.lineage_name = :"SYS_B_08" AND l.lineage_id <= :"SYS_B_09") AND SDE_STATE_ID = :"SYS_B_10") UNION ALL SELECT
    a.OBJECTID,a.TRAY_NUMBER,a.DB_LOSS,a.FIRST_UNIT,a.N_UNITS,a.CONNECTION_OBJECTID,a.CONNECTOR_TYPE_NAME,a.DEDICATED_STATUS,a.MID_SPAN_DISTANCE  FROM NE.A97
    a,SDE.state_lineages SL WHERE (a.OBJECTID, a.SDE_STATE_ID) NOT IN (SELECT /*+ HASH_AJ */ SDE_DELETES_ROW_ID,SDE_STATE_ID  FROM NE.D97 WHERE DELETED_AT IN
    (SELECT l.lineage_id FROM SDE.state_lineages l WHERE l.lineage_name = :"SYS_B_11" AND l.lineage_id <= :"SYS_B_12") AND SDE_STATE_ID > :"SYS_B_13") AND
    a.SDE_STATE_ID = SL.lineage_id AND SL.lineage_name = :"SYS_B_14" AND SL.lineage_id <= :"SYS_B_15") V__97  WHERE (((((   (
                                             NE.tmp_trace.equipment_object_id = V__96.to_objectid
                                              AND
                                             V__96.to_classid = :"SYS_B_16"
                                           OR
                                             NE.tmp_trace.transmedia_object_id = V__96.to_objectid
                                               AND
                                             V__96.to_classid = :"SYS_B_17"
                                             )) AND (
                                            (V__96.to_firstunit
                                                BETWEEN NE.tmp_trace.first_unit AND NE.tmp_trace.last_unit)
                                              OR
                                            (NE.tmp_trace.first_unit BETWEEN V__96.to_firstunit
                                                 AND V__96.to_firstunit + V__96.number_of_units - :"SYS_B_18")
                                          )) AND V__96.answers = :"SYS_B_19") AND V__96.objectid = V__97.connection_objectid) AND (NE.tmp_trace.session_id =
    :"SYS_B_20"))
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        1      5.98       5.99          0      22652          0          10
    total        3      5.98       5.99          0      22652          0          10
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 45 
    Rows     Row Source Operation
         10  NESTED LOOPS  (cr=22652 pr=0 pw=0 time=654515 us cost=67 size=282 card=1)
         10   NESTED LOOPS  (cr=22436 pr=0 pw=0 time=653673 us cost=61 size=235 card=1)
         10    TABLE ACCESS FULL TMP_TRACE (cr=5 pr=0 pw=0 time=7 us cost=2 size=65 card=1)
         10    VIEW  (cr=22431 pr=0 pw=0 time=0 us cost=59 size=170 card=1)
    1773000     UNION-ALL  (cr=22431 pr=0 pw=0 time=93649 us)
          0      NESTED LOOPS ANTI (cr=30 pr=0 pw=0 time=0 us cost=3 size=185 card=1)
          0       TABLE ACCESS FULL CONNECTION (cr=30 pr=0 pw=0 time=0 us cost=2 size=181 card=1)
          0       VIEW PUSHED PREDICATE  VW_NSO_3 (cr=0 pr=0 pw=0 time=0 us cost=1 size=4 card=1)
          0        NESTED LOOPS  (cr=0 pr=0 pw=0 time=0 us cost=1 size=20 card=1)
          0         INDEX RANGE SCAN LINEAGES_PK (cr=0 pr=0 pw=0 time=0 us cost=1 size=7 card=1)(object id 34021)
          0         INDEX UNIQUE SCAN D96_PK (cr=0 pr=0 pw=0 time=0 us cost=0 size=13 card=1)(object id 35121)
    1773000      HASH JOIN RIGHT ANTI (cr=22401 pr=0 pw=0 time=75084 us cost=56 size=46948 card=484)
          0       VIEW  VW_NSO_4 (cr=180 pr=0 pw=0 time=0 us cost=2 size=26 card=1)
          0        FILTER  (cr=180 pr=0 pw=0 time=0 us)
          0         NESTED LOOPS  (cr=180 pr=0 pw=0 time=0 us cost=2 size=20 card=1)
          0          INDEX FAST FULL SCAN D96_PK (cr=180 pr=0 pw=0 time=0 us cost=2 size=13 card=1)(object id 35121)
          0          INDEX UNIQUE SCAN LINEAGES_PK (cr=0 pr=0 pw=0 time=0 us cost=0 size=7 card=1)(object id 34021)
    1773000       NESTED LOOPS  (cr=22221 pr=0 pw=0 time=56155 us)
    1773000        NESTED LOOPS  (cr=3231 pr=0 pw=0 time=15078 us cost=53 size=34364 card=484)
         50         INDEX RANGE SCAN LINEAGES_PK (cr=10 pr=0 pw=0 time=7 us cost=1 size=7 card=1)(object id 34021)
    1773000         INDEX RANGE SCAN A96_STATEID_IX1 (cr=3221 pr=0 pw=0 time=6810 us cost=32 size=0 card=1774)(object id 35116)
    1773000        TABLE ACCESS BY INDEX ROWID A96 (cr=18990 pr=0 pw=0 time=0 us cost=52 size=82560 card=1290)
         10   VIEW  (cr=216 pr=0 pw=0 time=0 us cost=7 size=47 card=1)
         10    UNION ALL PUSHED PREDICATE  (cr=216 pr=0 pw=0 time=0 us)
          0     NESTED LOOPS ANTI (cr=1 pr=0 pw=0 time=0 us cost=2 size=82 card=1)
          0      TABLE ACCESS BY INDEX ROWID CONNECTION_ATTRIBUTES (cr=1 pr=0 pw=0 time=0 us cost=1 size=78 card=1)
          0       INDEX RANGE SCAN GDB_59_CONNECTIO (cr=1 pr=0 pw=0 time=0 us cost=1 size=0 card=1)(object id 34346)
          0      VIEW PUSHED PREDICATE  VW_NSO_1 (cr=0 pr=0 pw=0 time=0 us cost=1 size=4 card=1)
          0       NESTED LOOPS  (cr=0 pr=0 pw=0 time=0 us cost=1 size=20 card=1)
          0        INDEX RANGE SCAN LINEAGES_PK (cr=0 pr=0 pw=0 time=0 us cost=1 size=7 card=1)(object id 34021)
          0        INDEX UNIQUE SCAN D97_PK (cr=0 pr=0 pw=0 time=0 us cost=0 size=13 card=1)(object id 35127)
         10     HASH JOIN ANTI (cr=215 pr=0 pw=0 time=0 us cost=5 size=55 card=1)
         10      NESTED LOOPS  (cr=35 pr=0 pw=0 time=0 us cost=2 size=29 card=1)
         10       TABLE ACCESS BY INDEX ROWID A97 (cr=25 pr=0 pw=0 time=0 us cost=2 size=22 card=1)
         10        INDEX RANGE SCAN GDB_59_CONNECTIO_A (cr=15 pr=0 pw=0 time=0 us cost=1 size=0 card=1)(object id 35122)
         10       INDEX UNIQUE SCAN LINEAGES_PK (cr=10 pr=0 pw=0 time=0 us cost=0 size=7 card=1)(object id 34021)
          0      VIEW  VW_NSO_2 (cr=180 pr=0 pw=0 time=0 us cost=2 size=26 card=1)
          0       FILTER  (cr=180 pr=0 pw=0 time=0 us)
          0        NESTED LOOPS  (cr=180 pr=0 pw=0 time=0 us cost=2 size=20 card=1)
          0         INDEX FAST FULL SCAN D97_PK (cr=180 pr=0 pw=0 time=0 us cost=2 size=13 card=1)(object id 35127)
          0         INDEX UNIQUE SCAN LINEAGES_PK (cr=0 pr=0 pw=0 time=0 us cost=0 size=7 card=1)(object id 34021)
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                       2        0.00          0.00
      SQL*Net message from client                     2        0.00          0.00After manually rewrite query in TOAD it produces nested loops on business table and than access v__96, v__97 produce desired quick performance.
    I can use stored outlines but this is the last chance. I am playing with hints right now to produce desired plan with no result yet.
    Does anybody know how to insist Oracle to merge internal views to bigger query block, so Oracle can choose better plan?
    Or any guide what hints to use from ol$hints to get desired result via hints addition to original sql query (thanks God application don't cut hints just pass-through to Oracle)?
    Thanks,
    Sergiy

  • How to display name of the table and the description and the table type

    Hi,
    Can you people tell me how to display the name of the table and the description and the table type (View, structure, etc...) used in the program.
    I want to display in a list.
    Kind Regards

    use this program
    TABLES : TSTC, tstct.
    TABLES : DD03l, DD02l.
    DATA : Program like sy-repid.
    DATA : BEGIN OF I_FINAL OCCURS 0,
    tabname LIKE dd02l-tabname,
    TABCLASS LIKE dd02l-tabCLASS,
    TEXT LIKE DD02T-DDTEXT,
    END OF I_FINAL.
    DATA : BEGIN of ITAB Occurs 0,
    name like dd02l-tabname,
    END OF ITAB.
    DATA : TCD(100) TYPE C.
    DATA : var1 LIKE dd02l-tabname.
    DATA : DESC LIKE TSTCT-TTEXT.
    selection-screen skip.
    SELECTION-SCREEN : BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    PARAMETERS : r1 RADIOBUTTON GROUP r DEFAULT 'X'.
    Parameters : Tcode like sy-tcode.
    selection-screen skip.
    PARAMETERS : r2 RADIOBUTTON GROUP r.
    Parameters : Prog like sy-repid.
    SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE text-001.
    select-options : Type for dd02l-tabclass .
    SELECTION-SCREEN END OF BLOCK B1 .
    at selection-screen.
    if r1 = 'X' and Tcode is initial.
    message e001(00) with 'Enter Transaction Code' .
    elseif r2 = 'X' and Prog is initial.
    message e001(00) with 'Enter Program Name' .
    endif.
    START-OF-SELECTION.
    if r1 = 'X'.
    Prog = ' '.
    select single * from TSTC where tcode = tcode.
    if sy-subrc = 0.
    program = TSTC-PGMNA.
    select single TTEXT from tstct into desc where tcode = tcode and SPRSL = 'E'.
    else.
    Write :/ 'Invalid Transaction Code'.
    exit.
    endif.
    elseif r2 = 'X'.
    Tcode = ' '.
    program = Prog.
    endif.
    CALL FUNCTION 'GET_TABLES'
    EXPORTING
    PROGNAME = Program
    TABLES
    TABLES_TAB = itab.
    if itab is initial.
    skip.
    skip.
    skip.
    skip.
    skip.
    WRITE :/40 'No Data Found' color 6 INTENSIFIED OFF.
    ELSE.
    PERFORM : categorize.
    endif.
    END-OF-SELECTION.
    LOOP AT I_FINAL.
    WRITE :/4 I_FINAL-tabname COLOR 2 INTENSIFIED OFF NO-GAP HOTSPOT ON, 35 I_FINAL-TABCLASS COLOR 2 INTENSIFIED OFF NO-GAP,
    50 I_FINAL-TEXT COLOR 2 INTENSIFIED OFF NO-GAP.
    ENDLOOP.
    AT LINE-SELECTION.
    TCD = SY-LISEL.
    var1 = TCD+3(30).
    set parameter id 'DTB' FIELD VAR1.
    call transaction 'SE11' and skip first screen.
    TOP-OF-PAGE.
    WRITE :/45 'TABLE DETAILS RELATED TO THE TRANSACTION CODE' COLOR 7 .
    WRITE :/2 'DATE : ' COLOR 1, SY-DATUM COLOR 1 INTENSIFIED OFF NO-GAP.
    WRITE :/2 'TRANSACTION CODE : ' COLOR 1, Tcode COLOR 1 INTENSIFIED OFF NO-GAP.
    WRITE :/2 'TCODE DESCRIPTION : ' COLOR 1, desc COLOR 1 INTENSIFIED OFF NO-GAP.
    WRITE :/2 'PROGRAM NAME : ' COLOR 1, PROGRAM COLOR 1 INTENSIFIED OFF NO-GAP.
    SKIP 1.
    WRITE :/1(140) SY-ULINE.
    WRITE :/4 'TABLE NAME' COLOR 5 INTENSIFIED OFF NO-GAP,35 'TABLE TYPE' COLOR 5 INTENSIFIED OFF NO-GAP,
    55 'DESCRIPTION' COLOR 5 INTENSIFIED OFF NO-GAP.
    WRITE :/1(140) SY-ULINE.
    *& Form categorize
    text
    --> p1 text
    <-- p2 text
    FORM categorize .
    SELECT dd02ltabname dd02ltabCLASS DD02T~DDTEXT
    FROM dd02l INNER JOIN DD02T ON dd02ltabname = dd02Ttabname
    INTO TABLE I_FINAL
    FOR ALL ENTRIES IN itab
    WHERE DD02L~TABNAME = ITAB-NAME AND TABCLASS IN TYPE AND DDLANGUAGE = 'E'.
    if sy-subrc <> 0.
    skip.
    skip.
    skip.
    skip.
    skip.
    WRITE :/40 'No Data Found' color 6 INTENSIFIED OFF.
    endif.

  • Help needed ... Default tables in XML Schema

    Hi all,
    I got a xsd definition here that does not do as I say ... g
    Though I specified default tables for Cisco_Card and Cisco_LogicalModule, not only the default tables with the names I specified are created but also additionally tables with the default name that is used if no name is specified.
    Actually I am trying to tell it defaultTable="" so no table at all is created. But there are always two tables: Cisco_Card1529_TAB and Cisco_LogicalModule1501_TAB.
    Can someone explain to me what I am doing wrong here?
    Thanks,
    Steff
    <xs:schema xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" xdb:storeVarrayAsTable="true">
         <xs:element name="InvDetails" xdb:defaultTable="XML_CISCOWORKS" xdb:maintainDOM="false">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="SchemaInfo" minOccurs="0"/>
                        <xs:element ref="RMEPlatform" minOccurs="0" maxOccurs="unbounded"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="SchemaInfo" xdb:defaultTable="" xdb:maintainDOM="false">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="RMEServer" type="xs:string" minOccurs="0"/>
                        <xs:element name="CreatedAt" type="xs:string" minOccurs="0"/>
                        <xs:element name="SchemaVersion" type="xs:string" minOccurs="0"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="RMEPlatform" xdb:defaultTable="" xdb:maintainDOM="false">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="Cisco_Chassis" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element ref="Cisco_NetworkElement" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element ref="Cisco_ComputerSystemPackage" minOccurs="0" maxOccurs="unbounded"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="Cisco_Chassis" xdb:defaultTable="" xdb:maintainDOM="false">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="InstanceID" type="xs:string"/>
                        <xs:element name="Model" type="xs:string" minOccurs="0"/>
                        <xs:element name="HardwareVersion" type="xs:string" minOccurs="0"/>
                        <xs:element name="SerialNumber" type="xs:string" minOccurs="0"/>
                        <xs:element name="ChassisSystemType" type="xs:string" minOccurs="0"/>
                        <xs:element name="NumberOfSlots" type="xs:integer" minOccurs="0"/>
                        <xs:element name="NoOfCommunicationConnectors" type="xs:integer" minOccurs="0"/>
                        <xs:element ref="Cisco_Backplane" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element ref="Cisco_Card" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element ref="AdditionalInformation" minOccurs="0" maxOccurs="unbounded"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="Cisco_Backplane" xdb:defaultTable="" xdb:maintainDOM="false">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="BackplaneType" type="xs:string" minOccurs="0"/>
                        <xs:element name="Model" type="xs:string" minOccurs="0"/>
                        <xs:element name="SerialNumber" type="xs:string" minOccurs="0"/>
                        <xs:element ref="AdditionalInformation" minOccurs="0" maxOccurs="unbounded"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="Cisco_Card" xdb:defaultTable="lala" xdb:maintainDOM="false">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="InstanceID" type="xs:integer"/>
                        <xs:element name="RequiresDaughterBoard" type="xs:boolean" minOccurs="0"/>
                        <xs:element name="Model" type="xs:string" minOccurs="0"/>
                        <xs:element name="SerialNumber" type="xs:string" minOccurs="0"/>
                        <xs:element name="LocationWithinContainer" type="xs:string" minOccurs="0"/>
                        <xs:element name="PartNumber" type="xs:string" minOccurs="0"/>
                        <xs:element name="CardType" type="xs:string" minOccurs="0"/>
                        <xs:element name="HardwareVersion" type="xs:string" minOccurs="0"/>
                        <xs:element name="Description" type="xs:string" minOccurs="0"/>
                        <xs:element name="OperationalStatus" type="xs:string" minOccurs="0"/>
                        <xs:element name="FWManufacturer" type="xs:string" minOccurs="0"/>
                        <xs:element name="Manufacturer" type="xs:string" minOccurs="0"/>
                        <xs:element name="NumberOfSlots" type="xs:integer" minOccurs="0"/>
                        <xs:element name="NoOfCommunicationConnectors" type="xs:integer" minOccurs="0"/>
                        <xs:element ref="SoftwareIdentity" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element ref="Cisco_CommunicationConnector" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element ref="Cisco_FlashDevice" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element ref="Cisco_PhysicalMemory" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element ref="Cisco_Card" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element ref="AdditionalInformation" minOccurs="0" maxOccurs="unbounded"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="Cisco_CommunicationConnector" xdb:defaultTable="" xdb:maintainDOM="false">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="InstanceID" type="xs:integer"/>
                        <xs:element name="ConnectorType" type="xs:string" minOccurs="0"/>
                        <xs:element name="Description" type="xs:string" minOccurs="0"/>
                        <xs:element ref="AdditionalInformation" minOccurs="0" maxOccurs="unbounded"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="Cisco_FlashDevice" xdb:defaultTable="" xdb:maintainDOM="false">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="InstanceID" type="xs:integer"/>
                        <xs:element name="InstanceName" type="xs:string" minOccurs="0"/>
                        <xs:element name="FlashDeviceType" type="xs:string" minOccurs="0"/>
                        <xs:element name="Size" type="xs:string" minOccurs="0"/>
                        <xs:element name="NumberOfPartitions" type="xs:integer" minOccurs="0"/>
                        <xs:element name="ChipCount" type="xs:integer" minOccurs="0"/>
                        <xs:element name="Description" type="xs:string" minOccurs="0"/>
                        <xs:element name="Removable" type="xs:boolean" minOccurs="0"/>
                        <xs:element ref="Cisco_FlashPartition" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element ref="AdditionalInformation" minOccurs="0" maxOccurs="unbounded"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="Cisco_FlashPartition" xdb:defaultTable="" xdb:maintainDOM="false">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="InstanceID" type="xs:integer"/>
                        <xs:element name="InstanceName" type="xs:string" minOccurs="0"/>
                        <xs:element name="Upgrade" type="xs:string" minOccurs="0"/>
                        <xs:element name="NeedsErasure" type="xs:boolean" minOccurs="0"/>
                        <xs:element name="PartitionStatus" minOccurs="0">
                             <xs:simpleType>
                                  <xs:restriction base="xs:string">
                                       <xs:enumeration value="unknown"/>
                                       <xs:enumeration value="readOnly"/>
                                       <xs:enumeration value="runFromFlash"/>
                                       <xs:enumeration value="readWrite"/>
                                  </xs:restriction>
                             </xs:simpleType>
                        </xs:element>
                        <xs:element name="FileSystemSize" type="xs:string" minOccurs="0"/>
                        <xs:element name="AvailableSpace" type="xs:string" minOccurs="0"/>
                        <xs:element name="FileCount" type="xs:integer" minOccurs="0"/>
                        <xs:element ref="Cisco_FlashFile" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element ref="AdditionalInformation" minOccurs="0" maxOccurs="unbounded"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="Cisco_FlashFile" xdb:defaultTable="" xdb:maintainDOM="false">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="InstanceID" type="xs:integer"/>
                        <xs:element name="FileSize" type="xs:string" minOccurs="0"/>
                        <xs:element name="FileStatus" minOccurs="0">
                             <xs:simpleType>
                                  <xs:restriction base="xs:string">
                                       <xs:enumeration value="unknown"/>
                                       <xs:enumeration value="deleted"/>
                                       <xs:enumeration value="invalidChecksum"/>
                                       <xs:enumeration value="valid"/>
                                  </xs:restriction>
                             </xs:simpleType>
                        </xs:element>
                        <xs:element name="Checksum" type="xs:string" minOccurs="0"/>
                        <xs:element name="InstanceName" type="xs:string" minOccurs="0"/>
                        <xs:element ref="AdditionalInformation" minOccurs="0" maxOccurs="unbounded"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="Cisco_PhysicalMemory" xdb:defaultTable="" xdb:maintainDOM="false">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="MemoryType" minOccurs="0">
                             <xs:simpleType>
                                  <xs:restriction base="xs:string">
                                       <xs:enumeration value="nvRam"/>
                                       <xs:enumeration value="NVRAM"/>
                                       <xs:enumeration value="processorRam"/>
                                       <xs:enumeration value="RAM"/>
                                       <xs:enumeration value="ROM"/>
                                       <xs:enumeration value="FEPROM"/>
                                       <xs:enumeration value="BRAM"/>
                                  </xs:restriction>
                             </xs:simpleType>
                        </xs:element>
                        <xs:element name="Capacity" type="xs:string" minOccurs="0"/>
                        <xs:element ref="AdditionalInformation" minOccurs="0" maxOccurs="unbounded"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="Cisco_NetworkElement" xdb:defaultTable="" xdb:maintainDOM="false">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="InstanceID" type="xs:integer"/>
                        <xs:element name="Description" type="xs:string" minOccurs="0"/>
                        <xs:element name="PrimaryOwnerName" type="xs:string" minOccurs="0"/>
                        <xs:element name="InstanceName" type="xs:string" minOccurs="0"/>
                        <xs:element name="PhysicalPosition" type="xs:string" minOccurs="0"/>
                        <xs:element name="SysObjectId" type="xs:string" minOccurs="0"/>
                        <xs:element name="SysUpTime" type="xs:string" minOccurs="0"/>
                        <xs:element name="OfficialHostName" type="xs:string" minOccurs="0"/>
                        <xs:element name="NumberOfPorts" type="xs:integer" minOccurs="0"/>
                        <xs:element ref="Cisco_LogicalModule" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element ref="Cisco_Port" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element ref="Cisco_MemoryPool" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element ref="Cisco_IfEntry" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element ref="Cisco_IPProtocolEndpoint" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element ref="Cisco_PEHasIfEntry" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element ref="AdditionalInformation" minOccurs="0" maxOccurs="unbounded"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="Cisco_LogicalModule" xdb:defaultTable="lolo" xdb:maintainDOM="false">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="InstanceID" type="xs:integer"/>
                        <xs:element name="ModuleNumber" type="xs:integer" minOccurs="0"/>
                        <xs:element name="ModuleType" type="xs:string" minOccurs="0"/>
                        <xs:element name="InstanceName" type="xs:string" minOccurs="0"/>
                        <xs:element name="EnabledStatus" type="xs:string" minOccurs="0"/>
                        <xs:element name="NumberOfPorts" type="xs:integer" minOccurs="0"/>
                        <xs:element ref="Cisco_Port" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element ref="Cisco_LogicalModule" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element ref="Cisco_OSElement" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element ref="AdditionalInformation" minOccurs="0" maxOccurs="unbounded"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="Cisco_Port" xdb:defaultTable="" xdb:maintainDOM="false">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="PortNumber" type="xs:integer" minOccurs="0"/>
                        <xs:element name="PortType" type="xs:string" minOccurs="0"/>
                        <xs:element name="InstanceName" type="xs:string" minOccurs="0"/>
                        <xs:element name="IfInstanceID" type="xs:integer" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element ref="AdditionalInformation" minOccurs="0" maxOccurs="unbounded"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="Cisco_MemoryPool" xdb:defaultTable="" xdb:maintainDOM="false">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="InstanceName" type="xs:string" minOccurs="0"/>
                        <xs:element name="PoolType" type="xs:integer" minOccurs="0"/>
                        <xs:element name="DynamicPoolType" type="xs:string" minOccurs="0"/>
                        <xs:element name="AlternatePoolType" type="xs:string" minOccurs="0"/>
                        <xs:element name="IsValid" type="xs:boolean" minOccurs="0"/>
                        <xs:element name="Allocated" type="xs:string" minOccurs="0"/>
                        <xs:element name="Free" type="xs:string" minOccurs="0"/>
                        <xs:element name="LargestFree" type="xs:string" minOccurs="0"/>
                        <xs:element ref="AdditionalInformation" minOccurs="0" maxOccurs="unbounded"/>
                        <!--PoolType ValueMap {"0", "1", "2", "3", "4", "5", "65536"},
    Values {"Unknown", "Processor", "I/O", "PCI", "Fast", "Multibus", "Dynamic"},
    -->
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="Cisco_OSElement" xdb:defaultTable="" xdb:maintainDOM="false">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="InstanceName" type="xs:string" minOccurs="0"/>
                        <xs:element name="OSFamily" type="xs:string" minOccurs="0"/>
                        <xs:element name="Version" type="xs:string" minOccurs="0"/>
                        <xs:element name="Description" type="xs:string" minOccurs="0"/>
                        <xs:element ref="AdditionalInformation" minOccurs="0" maxOccurs="unbounded"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="Cisco_IfEntry" xdb:defaultTable="" xdb:maintainDOM="false">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="InstanceID" type="xs:string"/>
                        <xs:element name="InstanceName" type="xs:string" minOccurs="0"/>
                        <xs:element name="ProtocolType" type="xs:string" minOccurs="0"/>
                        <xs:element name="Speed" type="xs:string" minOccurs="0"/>
                        <xs:element name="RequestedStatus" minOccurs="0">
                             <xs:simpleType>
                                  <xs:restriction base="xs:string">
                                       <xs:enumeration value="up"/>
                                       <xs:enumeration value="down"/>
                                       <xs:enumeration value="testing"/>
                                  </xs:restriction>
                             </xs:simpleType>
                        </xs:element>
                        <xs:element name="OperationalStatus" minOccurs="0">
                             <xs:simpleType>
                                  <xs:restriction base="xs:string">
                                       <xs:enumeration value="Up"/>
                                       <xs:enumeration value="Down"/>
                                       <xs:enumeration value="Testing"/>
                                       <xs:enumeration value="Unknown"/>
                                       <xs:enumeration value="Dormant"/>
                                  </xs:restriction>
                             </xs:simpleType>
                        </xs:element>
                        <xs:element name="Description" type="xs:string" minOccurs="0"/>
                        <xs:element name="PhysicalAddress" type="xs:string" minOccurs="0"/>
                        <xs:element name="NetworkAddress" type="xs:string" minOccurs="0"/>
                        <xs:element ref="AdditionalInformation" minOccurs="0" maxOccurs="unbounded"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="Cisco_IPProtocolEndpoint" xdb:defaultTable="" xdb:maintainDOM="false">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="Address" type="xs:string" minOccurs="0"/>
                        <xs:element name="SubnetMask" type="xs:string" minOccurs="0"/>
                        <xs:element name="DefaultGateway" type="xs:string" minOccurs="0"/>
                        <xs:element ref="AdditionalInformation" minOccurs="0" maxOccurs="unbounded"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="Cisco_PEHasIfEntry" xdb:defaultTable="" xdb:maintainDOM="false">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="Cisco_IPProtocolEndpoint" type="xs:string" minOccurs="0"/>
                        <xs:element name="Cisco_IfEntry" type="xs:string" minOccurs="0"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="Cisco_ComputerSystemPackage" xdb:defaultTable="" xdb:maintainDOM="false">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="Antecedent" type="xs:string" minOccurs="0"/>
                        <xs:element name="Dependent" type="xs:string" minOccurs="0"/>
                        <!--
    Antecedent is the InstanceID from Cisco_Chassis Element
    Dependent is the InstanceID from Cisco_NetworkElement
    -->
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="SoftwareIdentity" xdb:defaultTable="" xdb:maintainDOM="false">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="Classification" minOccurs="0">
                             <xs:simpleType>
                                  <xs:restriction base="xs:string">
                                       <xs:enumeration value="Firmware"/>
                                       <xs:enumeration value="Software"/>
                                  </xs:restriction>
                             </xs:simpleType>
                        </xs:element>
                        <xs:element name="VersionString" type="xs:string" minOccurs="0"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="AdditionalInformation" xdb:defaultTable="" xdb:maintainDOM="true">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="AD" minOccurs="0" maxOccurs="unbounded" xdb:maintainDOM="false">
                             <xs:complexType>
                                  <xs:attribute name="name" type="xs:string"/>
                                  <xs:attribute name="value" type="xs:string"/>
                             </xs:complexType>
                        </xs:element>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
    </xs:schema>

    Here's the Culprit
    <xs:element name="Cisco_Card" xdb:defaultTable="lala" xdb:maintainDOM="false">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="InstanceID" type="xs:integer"/>
                        <xs:element name="RequiresDaughterBoard" type="xs:boolean" minOccurs="0"/>
                        <xs:element name="Model" type="xs:string" minOccurs="0"/>
                        <xs:element name="SerialNumber" type="xs:string" minOccurs="0"/>
                        <xs:element name="LocationWithinContainer" type="xs:string" minOccurs="0"/>
                        <xs:element name="PartNumber" type="xs:string" minOccurs="0"/>
                        <xs:element name="CardType" type="xs:string" minOccurs="0"/>
                        <xs:element name="HardwareVersion" type="xs:string" minOccurs="0"/>
                        <xs:element name="Description" type="xs:string" minOccurs="0"/>
                        <xs:element name="OperationalStatus" type="xs:string" minOccurs="0"/>
                        <xs:element name="FWManufacturer" type="xs:string" minOccurs="0"/>
                        <xs:element name="Manufacturer" type="xs:string" minOccurs="0"/>
                        <xs:element name="NumberOfSlots" type="xs:integer" minOccurs="0"/>
                        <xs:element name="NoOfCommunicationConnectors" type="xs:integer" minOccurs="0"/>
                        <xs:element ref="SoftwareIdentity" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element ref="Cisco_CommunicationConnector" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element ref="Cisco_FlashDevice" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element ref="Cisco_PhysicalMemory" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element ref="Cisco_Card" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element ref="AdditionalInformation" minOccurs="0" maxOccurs="unbounded"/>
                   </xs:sequence>
              </xs:complexType>Note that the element Cisco_Card contains a ref to itself. The same is true of the element Cisco_LogicalModule.
    When we encounter recursive structures we break the recursion by storing the recursive elements out-out-line is a seperate table and using a pointer (REF XMLType) column to track the relationionship..
    You can name these elements by putting an xdb:SQLInline="false" and xdb:defaultTable="YOUR_TABLE_NAME" on the recursive element.
    If you need to query accross these elements I would strongly advise upgrading to 10.2.x. In 10.2.x we implemented a number of optimizations for dealing with storing and querying this kind of structure.

  • Difference between materailized view and a table

    hey hiii
    i want to know what is a difference between a materialized view and a table i.e suppose i create a table A and another table B on table A i have created a trigger which will upload all the changes made in A ie insert,update or delete so whether this will perform all the action that a materialized view can perform on A or is there any difference between them
    thks

    I'll add to Nicolas' answer that the MV maintenance does have access to mechsnisms other than row-by-row replication of the trigger-based type. Direct path inserts to the base table are very efficiently propagated to the MV, as are partition-based DDL operations. Also MV's come with optional query rewrite built in (you need 10g+ to query rewrite to a non-MV data set), and scheduled refresh so you can defer maintenance of the data set until later.
    MV maintenance can be less efficient though -- you may know something about the data and the way that it changes that allows you to write more efficient meintenance than the MV code.

  • How to integrate from MS SQL SERVER 2005 and Flatfile to Oracle 10g.

    Hi
    I am new to ODI. I am trying to load sample data from MS SQL Server 2005 and Flatfile to Oracle 10g.
    1. I have created three models.
    1-1. SQL2005 (SRC_CUSTOMER table)
    1-2. Flatfile (SRC_AGE_GROUP.txt & SRC_SALES_PERSON.txt)
    1-3. Oracle 10g (TRG_CUSTOMER table)
    You may know I got those environments from the ODI DEMO environment.
    2. I could able to reverse the tables also.
    3. I have created an interface which contains source table (from MSSQL 2005), Flatfile and target table from ORACLE model.
    4. I have imported the knowledge modules. But I am confusing in selecting the knowledge modules to source and target tables.
    I've selected LKM File to SQL for flatfile model.
    I've also selected LKM SQL to SQL for MSSQL 2005 model and IKM Oracle Incremental Update for the target table (ORACLE).
    I've also implemented the interface that I created. It worked without errors. But there is no data in target table which is TRG_CUSTOMER.
    I really would like to know what happened and what the problems are.
    You can email me [email protected]
    Thanks in advance
    Jason Lee

    what did give for SRC_AGE_GROUP SRC_CUSTOMER join condition
    if it is
    (SRC_CUSTOMER.AGE=SRC_AGE_GROUP.AGE_MIN) AND SRC_CUSTOMER.AGE=SRC_AGE_GROUP.AGE_MAX
    give it as
    (SRC_CUSTOMER.AGE>SRC_AGE_GROUP.AGE_MIN) AND SRC_CUSTOMER.AGE<SRC_AGE_GROUP.AGE_MAX

  • Course Type combination of Sequence, Alternate Group and Default in PP01

    Hi Guys,
    Need your help that we are facing currently.
    While linking Course type with Course program(Mandatory block),  we are facing  issue below-
    No sequence number visible on portal.
    Trainings are visible in Alternative section.
    After initial analyse,we found that in additional data of course type sequence(Element Sequence),alternate group and defaults(Element Alternatives) should be maintained. But not sure what should be the correct combination through which i should be able to see correct sequence in proper section.
    Please suggest the proper combiation for this linkage which will be useful for me.
    Regards,
    Shiva

    Hi,
    When you maintain condition record that time system bring unit of measurement from material master and curancy from sales organization in which you created material.
    Now in your customized table case, there is sales organization but not any material so it is not bringing it default  as you don't have material.
    So in this case you have to maintain it manually
    Note - you material type, material group,etc not depandant to any UoM
    Kapil

  • How to determine Default Table Logging (log data changes )

    Does anyone know how to view exactly what tables and related data fields have change logging enabled by default? I know that some of the standard reports will produce "edit reports" show who changed what field, when ,old and new values, etc, but I don't know how to determine where the data is retrieved from.
    For example: If I look in the ABAP Dictionary at table LFA1, technical settings, it shows that log data changes is not "checked" or enabled. But if I run the standard AR Master Data Change Report, I get output showing valid field changes.
    I have seen other threads that refer to SCU3 but I can't determine the above this from report.
    Any assistance would be greatly appreciated.

    Hi Arthur,
    As far as I am aware, these are 2 different things. 
    There is table logging which is at the table level & if activated (i.e. it's listed in table DD0LV, PROTOKOLL=X and the table logging parameter is set in the system profile/s).
    The second one is programatical logging for change documents when data is maintained though a program that has been written to include a log.  I'm not sure how to identify a complete lit of these though unfortunately.
    Hope that is of some assistance.

  • SQ01 Output From Joining VBSEGK and VBSEGS tables-1 line of output per DOC

    I setup a query using SQ01 which uses tables VBSEGK and VBSEGS ( parked documents).   The VBSEGS table has multiple lines per document in that there are multiple G/L accounts, cost centers and amounts in order to distribute expense acorss multiple cost centers from one vendor's invoice.     When I execute the query only the first line item in the VBSEGS table appears and the remaining lines do not appear.    Any insight to get all line items for each document from the VCSEGS table to appear will be appreciated.

    Hi,
    By default four links will be established between VBSEGK and VBESGS.
    AUSBK
    BELNR
    GJAHR
    BZKEY (This link should be removed for getting all the records)
    However, you get the line items only if documents exist in both the tables.  Apart from that, if two line items in one table and three line items in another table, you will get only three line items in the report.  You need to select fields related to VBSEGK and VBSEGS tables.
    Please provide me more information on your exact requirement.  I can confirm you whether this  is possible by way of query.
    Best Regards,
    Madhu

Maybe you are looking for