Oracle XML Indexing
Hi I have to index around 40 differnet property because my application is seraching on it.If create separate 40 column and index it then my indexing cost will be huge and maintaining 40 index will be i guess problematic.So Can anybody tell me if I want to store this different 40 propety in one XML doc and index XML doc then will oracle has in built feature to index XML.Any document or link or any suggestion will be highly appriciated.
I have to index around 40 differnet propertyBecause of this business need any way you will be facing indexing cost on dml operations, especially updates - http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/data_acc.htm#i2678
will oracle has in built feature to index XMLOracle XML DB supports the creation of three kinds of index on XML content:
* Text-based indexes – These can be created on any XMLType table or column.
* Function-based indexes – These can be created on any XMLType table or column.
* B-Tree indexes – When the XMLType table or column is based on structured storage techniques, conventional B-Tree indexes can be created on underlying SQL types.
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14259/xdb03usg.htm#BABFJBHD
Ex. : create index XMLTable_ind on XMLTable
(extractValue(xml_data, '...
Also there may be some other ideas using XML and Oracle together - http://www.oracle.com/technology/tech/xml/index.html
Best regards.
Similar Messages
-
Org.xml.sax.SAXException: oracle.AWXML.Index
i got the following error when i try to create an analytic workspace from a template file, in Analytic workspace manager 10g.
Unable to create Analytic Workspace From file c:\...\global.xml
org.xml.sax.SAXException: oracle.AWXML.Index
at oracle.AWXML.AWHandlerBase.startElement(AWHandlerBase.java:123)
at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1224)
at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:311)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:278)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:294)
at oracle.olap.awm.dataobject.modeler.ModelDO.readBaseObjectFromFile(ModelDO.java:744)
at oracle.olap.awm.navigator.node.WorkspaceNode$1.construct(WorkspaceNode.java:1084)
at oracle.olap.awm.ui.SwingWorker$2.run(SwingWorker.java:109)
at java.lang.Thread.run(Unknown Source)
this is available in this site under the heading
"downloading and installing the second global schema for documentation"
in global_doc.zip file.
very urgent please..If you have not specified an external WSDL file in your webservice where the arguments (with their types are defined) then you cannot use the type="any" in your webservice arguments.
If you want to use an external WSDL and define the argument types there you can do this by adding wsdlfile="nameOfExternal.wsdl" style="document" to your cfcomponent tag. -
ORA-00942 error on truncating a table with a XML Index
Oracle Version: 11.2.0.1.0
When truncate command fails with error "ORA-00942: table or view does not exist" when run against a table with an XML Index defined
SQL> CREATE TABLE XML_TEST
2 (
3 ID INTEGER,
4 TESTXML SYS.XMLTYPE
5 );
Table created.
SQL> truncate table XML_TEST;
Table truncated.
SQL> CREATE INDEX xmlindex ON XML_TEST(TESTXML)
2 indextype IS xdb.xmlindex
3 parameters ('PATH TABLE MY_PATH_TABLE');
Index created.
SQL> truncate table XML_TEST;
truncate table XML_TEST
ERROR at line 1:
ORA-00942: table or view does not exist
SQL> Drop Index xmlindex;
Index dropped.
SQL> truncate table XML_TEST;
Table truncated.No, I don't think that explanation is correct. I don't think it has to do with user privs. besides, we don't
adjust rowids on an import -- we recreate the index, just like a b-tree index import would.
This should be working. It's most likely a bug in our (i.e. Text) import code -- SYS.XMLTYPE is a little
strange because under the covers it's actually a function-based index.
I will test it out and file a bug if I can reproduce the behavior on solaris. -
Performance issues - which oracle xml technology to use?
Our company has spent some time researching different oracle xml technologies to obtain the fastest performence but also have the flexibily of a changing xml schemas across revs.
Not registering schemas gives the flexibity of quickly changing schemas between revs and simpler table structure, but hurts performance quite a bit compared to registering schemas.
Flat non xml tables seems the fastest but seeing that everything is going xml, this doesn;t seems like a choice.
Anyhow, let me know any input/experience anyone can offer.
here's what we have tested all with simple
10000 record tests, each of the form:
insert into po_tab values (1,
xmltype('<PurchaseOrder xmlns="http://www.oracle.com/PO.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.oracle.com/PO.xsd
http://www.oracle.com/PO.xsd">
<PONum>akkk</PONum>
<Company>Oracle Corp</Company>
<Item>
<Part>9i Doc Set</Part>
<Price>2550</Price>
</Item>
<Item>
<Part>8i Doc Set</Part>
<Price>350</Price>
</Item>
</PurchaseOrder>'));
we have tried three schenerios
-flat tables, non xml db
-xml db with registering schemas
-xml db but not registering schemas, just using XmlType
and adding oracle text xml indexes with paths to speed up
queries
now for the results
- flat tables, non xml db (we where thinking of using it like this to ease fetching of data for ui views in ad hoc situations, then have code to export the data into
xml, is there any oracle tool that will let me
export the data into
xml automatically via a schema?)
create table po_tabSimple(
id int constraint id_pk PRIMARY KEY,
part varchar2(100),
price number
insert into po_tabSimple values (i, 'test', 1.000);
select part from po_tabSimple;
2 seconds (Quickest)
-xml db with registering schemas
declare
doc varchar2(1000) := '<schema
targetNamespace="http://www.oracle.com/PO.xsd"
xmlns:po="http://www.oracle.com/PO.xsd"
xmlns="http://www.w3.org/2001/XMLSchema">
<complexType name="PurchaseOrderType">
<sequence>
<element name="PONum" type="decimal"/>
<element name="Company">
<simpleType>
<restriction base="string">
<maxLength value="100"/>
</restriction>
</simpleType>
</element>
<element name="Item" maxOccurs="1000">
<complexType>
<sequence>
<element name="Part">
<simpleType>
<restriction base="string">
<maxLength value="1000"/>
</restriction>
</simpleType>
</element>
<element name="Price" type="float"/>
</sequence>
</complexType>
</element>
</sequence>
</complexType>
<element name="PurchaseOrder" type="po:PurchaseOrderType"/>
</schema>';
begin
dbms_xmlschema.registerSchema('http://www.oracle.com/PO.xsd', doc);
end;
create table po_tab(
id number,
po sys.XMLType
xmltype column po
XMLSCHEMA "http://www.oracle.com/PO.xsd"
element "PurchaseOrder";
select EXTRACT(po_tab.po, '/PurchaseOrder/Item/Part/text()','xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"').getStringVal() from po_tab;
4 sec
-xml db but not registering schemas, just using XmlType
and adding oracle text xml indexes with paths to speed up
queries
create table po_tabOld(
id number,
po sys.XMLType
select EXTRACT(po_tabOld.po, '/PurchaseOrder/Item/Part/text()','xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"').getStringVal() from po_tabOld;
41 seconds without indexes
41 seconds with indexes
here are the indexes used
CREATE INDEX po_tabColOld_idx ON po_tabOld(po) indextype is ctxsys.ctxxpath;
CREATE INDEX po_tabOld_idx ON po_tabOld X (X.po.extract('/PurchaseOrder/Item/Part/text()','xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"').getStringVal());Our company has spent some time researching different oracle xml technologies to obtain the fastest performence but also have the flexibily of a changing xml schemas across revs.
Not registering schemas gives the flexibity of quickly changing schemas between revs and simpler table structure, but hurts performance quite a bit compared to registering schemas.
Flat non xml tables seems the fastest but seeing that everything is going xml, this doesn;t seems like a choice.
Anyhow, let me know any input/experience anyone can offer.
here's what we have tested all with simple
10000 record tests, each of the form:
insert into po_tab values (1,
xmltype('<PurchaseOrder xmlns="http://www.oracle.com/PO.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.oracle.com/PO.xsd
http://www.oracle.com/PO.xsd">
<PONum>akkk</PONum>
<Company>Oracle Corp</Company>
<Item>
<Part>9i Doc Set</Part>
<Price>2550</Price>
</Item>
<Item>
<Part>8i Doc Set</Part>
<Price>350</Price>
</Item>
</PurchaseOrder>'));
we have tried three schenerios
-flat tables, non xml db
-xml db with registering schemas
-xml db but not registering schemas, just using XmlType
and adding oracle text xml indexes with paths to speed up
queries
now for the results
- flat tables, non xml db (we where thinking of using it like this to ease fetching of data for ui views in ad hoc situations, then have code to export the data into
xml, is there any oracle tool that will let me
export the data into
xml automatically via a schema?)
create table po_tabSimple(
id int constraint id_pk PRIMARY KEY,
part varchar2(100),
price number
insert into po_tabSimple values (i, 'test', 1.000);
select part from po_tabSimple;
2 seconds (Quickest)
-xml db with registering schemas
declare
doc varchar2(1000) := '<schema
targetNamespace="http://www.oracle.com/PO.xsd"
xmlns:po="http://www.oracle.com/PO.xsd"
xmlns="http://www.w3.org/2001/XMLSchema">
<complexType name="PurchaseOrderType">
<sequence>
<element name="PONum" type="decimal"/>
<element name="Company">
<simpleType>
<restriction base="string">
<maxLength value="100"/>
</restriction>
</simpleType>
</element>
<element name="Item" maxOccurs="1000">
<complexType>
<sequence>
<element name="Part">
<simpleType>
<restriction base="string">
<maxLength value="1000"/>
</restriction>
</simpleType>
</element>
<element name="Price" type="float"/>
</sequence>
</complexType>
</element>
</sequence>
</complexType>
<element name="PurchaseOrder" type="po:PurchaseOrderType"/>
</schema>';
begin
dbms_xmlschema.registerSchema('http://www.oracle.com/PO.xsd', doc);
end;
create table po_tab(
id number,
po sys.XMLType
xmltype column po
XMLSCHEMA "http://www.oracle.com/PO.xsd"
element "PurchaseOrder";
select EXTRACT(po_tab.po, '/PurchaseOrder/Item/Part/text()','xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"').getStringVal() from po_tab;
4 sec
-xml db but not registering schemas, just using XmlType
and adding oracle text xml indexes with paths to speed up
queries
create table po_tabOld(
id number,
po sys.XMLType
select EXTRACT(po_tabOld.po, '/PurchaseOrder/Item/Part/text()','xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"').getStringVal() from po_tabOld;
41 seconds without indexes
41 seconds with indexes
here are the indexes used
CREATE INDEX po_tabColOld_idx ON po_tabOld(po) indextype is ctxsys.ctxxpath;
CREATE INDEX po_tabOld_idx ON po_tabOld X (X.po.extract('/PurchaseOrder/Item/Part/text()','xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"').getStringVal()); -
Using Oracle Text in Oracle XML DB .
Hi all ,
The idea is simple ,i need to index all stored files in Oracle XML DB and the index should stay in Oracle DB . Using some 3 party index software is also possible but you need to write a mapping to move the index file in Oracle DB .
So i thought of using Oracle Text but i am not sure about how to retrieve such a document from Oracle XML DB , let me say over ftp or http ? . And if these documents are password protected -> how can Oracle Text allow this ?[11gR2 XMLDB Developers Guide -- Full-Text Search over XML Data|http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10492/xdb09sea.htm#i1006756] would be the first place to start.
For document display, there a bunch of potential solutions, you can look at [XML DB Repository|http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10492/xdb03usg.htm#insertedID18], or the Text Application Developers Guide [Presenting Documents in Oracle Text|http://download.oracle.com/docs/cd/B28359_01/text.111/b28303/view.htm#i1006687] .
Password protected documents can't be indexed using the auto_filter. -
ORA-30966: error detected in the XML Index layer
Dear all,
after upgrading from 9.2.0.8 to 11.2.0.1, Autoconfig ended with error:
Alert log file shows :
Mon Jul 04 21:33:50 2011
Errors in file /ebiz/oracle/diag/rdbms/vision/VISION/trace/VISION_ora_31642.trc (incident=16196):
+ORA-00600: internal error code, arguments: [kzxcInitLoadLocal-7], [64131], [ORA-64131: XMLIndex Metadata: failure during the looking up of the dictionary+
+ORA-30966: error detected in the XML Index layer+
+ORA-31011: XML parsing failed+
+ORA-01403: no data found+
+], [], [], [], [], [], [], [], [], []+
ORA-01403: no data found
Incident details in: /ebiz/oracle/diag/rdbms/vision/VISION/incident/incdir_16196/VISION_ora_31642_i16196.trc
Mon Jul 04 21:48:25 2011
Incremental checkpoint up to RBA [0x3b2.a445.0], current log tail at RBA [0x3b2.a447.0]
Mon Jul 04 21:49:25 2011
Errors in file /ebiz/oracle/diag/rdbms/vision/VISION/trace/VISION_ora_330.trc (incident=16206):
+ORA-00600: internal error code, arguments: [kzxcInitLoadLocal-7], [64131], [ORA-64131: XMLIndex Metadata: failure during the looking up of the dictionary+
+ORA-30966: error detected in the XML Index layer+
+ORA-31011: XML parsing failed+
for ORA-30966 i found one metalink document
Bug 9496480: XDB VIEWS INVALIDATED AFTER RUNNING CATUPGRD.SQL UPGRADING 9.2.0.8.0 TO 11.2.0.1I am not able to understand this bug detail, can some one help me to understand this BUG 9496480. Is it possible to run autoconfig ?RegardsHAMEEDThis the result shows that ORACLE REAL APPLICATION CLUSTERS status is "INVALID" but we dont have any RAC configuration.!!!
SQL> select COMP_NAME,VERSION,STATUS from dba_registry;
COMP_NAME VERSION STATUS
Oracle Database Catalog Views 11.2.0.1.0 VALID
Oracle Database Packages and Types 11.2.0.1.0 VALID
Oracle Real Application Clusters 11.2.0.1.0 INVALID
JServer JAVA Virtual Machine 11.2.0.1.0 VALID
Oracle XDK 11.2.0.1.0 VALID
Oracle Database Java Packages 11.2.0.1.0 VALID
Oracle Multimedia 11.2.0.1.0 VALID
Spatial 11.2.0.1.0 VALID
Oracle Text 11.2.0.1.0 VALID
OLAP Analytic Workspace 11.2.0.1.0 VALID
Oracle OLAP API 11.2.0.1.0 VALID
OLAP Catalog 11.2.0.1.0 VALID
Oracle Data Mining 11.2.0.1.0 VALID
Oracle XML Database 11.2.0.1.0 VALID
14 rows selected.Kindly let me know what is the otherway !
Regards
HAMEED -
Oracle.xml.xsql.XSQLServlet in Java Web Server 2.0
Does anyone know how to add the oracle.xml.xsql.XSQLServlet in the Java Web Srever 2.0? When running the helloworld.xsql I am now getting the following error message.
"500 Internal Server Error
The servlet named oracle.xml.xsql.XSQLServlet at the requested URL
http://nw601250:8080/xsql/demo/helloworld.xsql
reported this exception: java.security.AccessControlException: access denied (java.io.FilePermission C:\JavaWebServer2.0\public_html\xsql\demo\helloworld.xsql read). Please report this to the administrator of the web server.
java.lang.RuntimeException: java.security.AccessControlException: access denied (java.io.FilePermission C:\JavaWebServer2.0\public_html\xsql\demo\helloworld.xsql read) at oracle.xml.xsql.XSQLPageManager.getPage(XSQLPageManager.java:122) at oracle.xml.xsql.XSQLPageProcessor.process(XSQLPageProcessor.java, Compiled Code) at oracle.xml.xsql.XSQLServlet.doGet(XSQLServlet.java:124) at javax.servlet.http.HttpServlet.service(HttpServlet.java:715) at javax.servlet.http.HttpServlet.service(HttpServlet.java:840) at com.sun.server.ServletState.callService(ServletState.java:226) at com.sun.server.ServletManager.callServletService(ServletManager.java:936) at com.sun.server.ProcessingState.invokeTargetServlet(ProcessingState.java:423) at com.sun.server.http.HttpProcessingState.execute(HttpProcessingState.java:79) at com.sun.server.http.stages.Runner.process(Runner.java:79) at com.sun.server.ProcessingSupport.process(ProcessingSupport.java, Compiled Code) at com.sun.server.Service.process(Service.java:204) at com.sun.server.http.HttpServiceHandler.handleRequest(HttpServiceHandler.java:374) at com.sun.server.http.HttpServiceHandler.handleRequest(HttpServiceHandler.java:166) at com.sun.server.HandlerThread.run(HandlerThread.java:162)"
I have the alias *.xsql set to map to the servlet named oracle.xml.xsql.XSQLServlet under the Servlet Aliases section, but I'm not sure how to add the servlet under the Servlet section, as I'm guessing that this is the problem I'm now experiencing. I tried adding oracle.xml.xsql.XSQLServlet as both the servlet name and class, but this is not working.
Any help would be greatly appreciated. Thanks!Rani,
The following is part of a message that was posted back on Nov. 7 of '99 from Steve Muench. I just followed this exactly with the Java Web Server 1.0.1 and it worked fine (including adding the classpath settings and xsql servlet mappings as it says below). Thanks,Dan
Here's the steps I just followed to run all the XSQL Demos under JSWDK 1.0.1
(1) Downloaded jswdk1_0_1-win.zip from Sun
(2) Installed in D:\jswdk-1.0.1
(3) Edited "startserver.bat" to add the
classpath entries needed by XSQL Servlet:
set CLASSPATH=%CLASSPATH%;d:\xsql\lib
set CLASSPATH=%CLASSPATH%;d:\xsql\lib\classes111.zip
set CLASSPATH=%CLASSPATH%;d:\xsql\lib\oraclexsql.jar
set CLASSPATH=%CLASSPATH%;d:\xsql\lib\oraclexmlsql.jar
set CLASSPATH=%CLASSPATH%;d:\xsql\lib\xmlparserv2.jar
(4)Edited d:/jswdk-1.0.1/webpages/WEB-INF/servlets.properties and added the line:
xsql.code=oracle.xml.xsql.XSQLServlet
(5) Edited d:/jswdk-1.0.1/webpages/WEB-INF/mappings.properties
and added the line:
.xsql=xsql
(6) Copied D:\xsql\demo to D:/jswdk-1.0.1/webpages/xsql/demo
(7) Started the Webserver with "startserver.bat"
(8) Browsed http://localhost:8080/xsql/demo/index.html
(9) Exercised all the demos.
Hope this helps.
Steve Muench
Oracle XML Team -
Is Oracle XML DB...right solution?
Background:
I'm working on a system, which gets content from various providers and our engine processes the content and extracts the key information and stores them in relational tables. End users can view this information using our web application. Our web application supports multiple levels of filtering (in other words n levels of filters - described below). In addition, application also supports users to and, or, not one or more filters.
Problem:
With relational schema we were not able to support n number of filters.
Here's why it's difficult with relational schema:
- get base data set
- apply filter 1 (value 1, 2, 3)
- filter 1 results
- apply filter 2 (value 90, 91, 99) on filter 1 results (trick part is applying filter2 constraints on filter1 results)
- filter2 results
- apply filter n on filter n-1 results and so on.
not exact query.. sample version for demonstration (for simplicity sake i've used only one table...in reality each exists query will be using more than one table)
select *
from content f1
where filter in (1, 2, 3)
and exists (select null from content f2
where f2.contentid = f1.contentid
and f2.filter not in (90, 91, 99))
and so on...
As number of filters increases in number, it's difficult to generate efficient queries.
As interim solution, we have decided to store the entire data in memory and operate on it. It works very well (really fast too). But, we are limited by memory size. Above solution is not scalable for large volumes of data.
Solution (using Oracle XML db):
Then, I stumbled on to XML db option and I did some preliminary investigation. Seems like, nice solution for above problem.
This is what I did so far using XML db:
Step 1:
Created and registered schema.
declare
xmlblurb varchar2(4000) := '<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb"
version="1.0" xdb:storeVarrayAsTable="true">
<xs:element name="docattribs" type="DocAttribsType" xdb:defaultTable="O_DOCATTRIBUTES1"/>
<xs:complexType name="DocAttribsType">
<xs:sequence>
<xs:element name="brandgroups" type="BrandGroupsType"/>
<xs:element name="messagegroups" type="MessageGroupsType"/>
<xs:element name="sources" type="SourcesType"/>
<xs:element name="contentgroups" type="ContentGroupsType"/>
<xs:element name="authors" type="AuthorsType"/>
<xs:element name="themes" type="ThemesType"/>
<xs:element name="entities" type="EntitiesType"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="BrandGroupsType">
<xs:sequence>
<xs:element name="bg" type="IdMentionsType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="MessageGroupsType">
<xs:sequence>
<xs:element name="mg" type="MessageGroupType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="MessageGroupType">
<xs:sequence>
<xs:element name="bg" type="IdType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="id" type="xs:integer"/>
</xs:complexType>
<xs:complexType name="SourcesType">
<xs:sequence>
<xs:element name="source" type="IdType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ContentGroupsType">
<xs:sequence>
<xs:element name="pcg" type="ParentContentGroupType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ParentContentGroupType">
<xs:sequence>
<xs:element name="cg" type="IdType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="id" type="xs:integer"/>
</xs:complexType>
<xs:complexType name="AuthorsType">
<xs:sequence>
<xs:element name="author" type="AuthorType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="AuthorType">
<xs:attribute name="name" type="xs:string"/>
</xs:complexType>
<xs:complexType name="ThemesType">
<xs:sequence>
<xs:element name="theme" type="IdType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="EntitiesType">
<xs:sequence>
<xs:element name="af" type="IdMentionsType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="a" type="IdMentionsType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="b" type="IdMentionsType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="c" type="IdMentionsType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="l" type="IdMentionsType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="m" type="IdMentionsType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="p" type="IdMentionsType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="IdMentionsType">
<xs:attribute name="id" type="xs:integer"/>
<xs:attribute name="mentions" type="xs:integer"/>
</xs:complexType>
<xs:complexType name="IdType">
<xs:attribute name="id" type="xs:integer"/>
</xs:complexType>
</xs:schema>';
begin
dbms_xmlschema.registerSchema('nt_t_docAttributes.xsd',
xmlblurb,
TRUE,
TRUE,
FALSE);
end;
Step 2:
Created table with XMLType column (with the help of article posted at this link http://forums.oracle.com/forums/thread.jspa?threadID=244846&start=15&tstart=0)
CREATE TABLE ot_docattributes (
docid NUMBER,
docdate DATE,
statusid NUMBER)
TABLESPACE data_10m_a
ALTER TABLE ot_docattributes
add (docdata xmltype)
xmltype column docdata store as object relational
xmlschema "nt_t_docAttributes.xsd" element "docattribs"
VARRAY DOCDATA."XMLDATA"."authors"."author" STORE AS table ot_authors
(constraint pk_ot_authors primary key (NESTED_TABLE_ID, ARRAY_INDEX))
VARRAY DOCDATA."XMLDATA"."brandgroups"."bg" STORE AS table ot_brandgroups
(constraint pk_ot_brandgroups primary key (NESTED_TABLE_ID, ARRAY_INDEX))
VARRAY DOCDATA."XMLDATA"."contentgroups"."pcg" STORE AS table ot_contentgroups
(constraint pk_ot_contentgroups primary key (NESTED_TABLE_ID, ARRAY_INDEX))
varray "cg" store as table ot_contentgroup
(constraint pk_ot_contentgroup primary key (NESTED_TABLE_ID, ARRAY_INDEX))
VARRAY DOCDATA."XMLDATA"."entities"."a" STORE AS table ot_analysts
(constraint pk_ot_analysts primary key (NESTED_TABLE_ID, ARRAY_INDEX))
VARRAY DOCDATA."XMLDATA"."entities"."af" STORE AS table ot_analystfirms
(constraint pk_ot_analystfirms primary key (NESTED_TABLE_ID, ARRAY_INDEX))
VARRAY DOCDATA."XMLDATA"."entities"."b" STORE AS table ot_brands
(constraint pk_ot_brands primary key (NESTED_TABLE_ID, ARRAY_INDEX))
VARRAY DOCDATA."XMLDATA"."entities"."c" STORE AS table ot_companies
(constraint pk_ot_companies primary key (NESTED_TABLE_ID, ARRAY_INDEX))
VARRAY DOCDATA."XMLDATA"."entities"."l" STORE AS table ot_locations
(constraint pk_ot_locations primary key (NESTED_TABLE_ID, ARRAY_INDEX))
VARRAY DOCDATA."XMLDATA"."entities"."m" STORE AS table ot_messages
(constraint pk_ot_messages primary key (NESTED_TABLE_ID, ARRAY_INDEX))
VARRAY DOCDATA."XMLDATA"."entities"."p" STORE AS table ot_people
(constraint pk_ot_people primary key (NESTED_TABLE_ID, ARRAY_INDEX))
VARRAY DOCDATA."XMLDATA"."messagegroups"."mg" STORE AS table ot_messagegroups
(constraint pk_ot_messagegroups primary key (NESTED_TABLE_ID, ARRAY_INDEX))
varray "bg" store as table ot_brandgroup
(constraint pk_ot_brandgroup primary key (NESTED_TABLE_ID, ARRAY_INDEX))
VARRAY DOCDATA."XMLDATA"."sources"."source" STORE AS table ot_sources
(constraint pk_ot_sources primary key (NESTED_TABLE_ID, ARRAY_INDEX))
VARRAY DOCDATA."XMLDATA"."themes"."theme" STORE AS table ot_themes
(constraint pk_ot_themes primary key (NESTED_TABLE_ID, ARRAY_INDEX))
Step 3:
Using Plsql script constructed and loaded XML data into above table. Here's the sample data:
<docattribs>
<brandgroups>
<bg id="28" mentions="1"/>
<bg id="34" mentions="1"/>
</brandgroups>
<messagegroups/>
<sources>
<source id="8243"/>
</sources>
<contentgroups>
<pcg id="263">
<cg id="270"/>
</pcg>
<pcg id="264">
<cg id="275"/>
</pcg>
</contentgroups>
<authors/>
<themes/>
<entities>
<b id="28" mentions="1"/>
<b id="34" mentions="1"/>
<c id="4320" mentions="2"/>
<c id="9662" mentions="1"/>
<c id="36259" mentions="1"/>
<c id="44573" mentions="1"/>
<c id="69889" mentions="2"/>
<c id="78583" mentions="1"/>
<c id="93566" mentions="1"/>
<c id="142667" mentions="1"/>
<c id="142669" mentions="1"/>
<c id="155740" mentions="1"/>
<c id="221847" mentions="5"/>
<l id="187667" mentions="1"/>
<l id="222780" mentions="1"/>
<p id="5973" mentions="1"/>
<p id="47503" mentions="1"/>
<p id="113753" mentions="3"/>
<p id="114425" mentions="7"/>
<p id="209501" mentions="2"/>
</entities>
</docattribs>
Step 4:
Here are typical queries we will use via our application. Using following queries application will fetch relevant docids and
uses them to fetch detail information. See samples below:
-- 19 secs.
-- 41185 rows
-- only watchlist
SELECT COUNT (docid)
FROM ot_docattributes
WHERE ( EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=1]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=2]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=5]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=7]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=8]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=9]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=12]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=13]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=14]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=15]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=19]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=30]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=34]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=43]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=48]') = 1
-- 8 secs.
-- 7605 rows
-- watchlist + brand filter (Viagra OR Zoloft)
SELECT COUNT (docid)
FROM ot_docattributes
WHERE ( EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=1]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=2]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=5]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=7]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=8]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=9]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=12]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=13]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=14]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=15]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=19]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=30]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=34]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=43]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=48]') = 1
AND ( EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=50]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=27]') = 1
-- 8 secs
-- 2324 rows
-- watchlist + brand filter (Viagra OR Zoloft) + not brand filter (Financial and Levitra)
SELECT COUNT (docid)
FROM ot_docattributes
WHERE ( EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=1]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=2]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=5]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=7]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=8]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=9]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=12]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=13]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=14]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=15]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=19]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=30]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=34]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=43]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=48]') = 1
AND ( EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=50]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=27]') = 1
AND EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=16]') = 0
AND EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=40]') = 0;
-- 8 secs
-- 141 rows
-- watchlist + brand filter (Viagra OR Zoloft) + not brand filter (Financial and Levitra)
-- message group filter ()
SELECT COUNT (docid)
FROM ot_docattributes
WHERE ( EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=1]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=2]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=5]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=7]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=8]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=9]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=12]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=13]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=14]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=15]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=19]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=30]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=34]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=43]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=48]') = 1
AND ( EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=50]') = 1
OR EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=27]') = 1
AND EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=16]') = 0
AND EXISTSNODE (docdata, '/docattribs/brandgroups/bg[@id=40]') = 0
AND EXISTSNODE (docdata, '/docattribs/messagegroups/mg[@id=27]') = 1;
Here's query execution plan:
Operation Object Name Rows Bytes Cost Object Node In/Out PStart PStop
SELECT STATEMENT Optimizer Mode=ALL_ROWS 1 1191.16324450158
SORT AGGREGATE 1 164
FILTER
TABLE ACCESS FULL ELILILLY_ORK.OT_DOCATTRIBUTES 16 2 K 1161.13277939939
TABLE ACCESS BY INDEX ROWID ELILILLY_ORK.OT_BRANDGROUPS 1 28 3.00304620318792
INDEX RANGE SCAN ELILILLY_ORK.PK_OT_BRANDGROUPS 2 2.00200471148267
TABLE ACCESS BY INDEX ROWID ELILILLY_ORK.OT_BRANDGROUPS 1 28 3.00304620318792
INDEX RANGE SCAN ELILILLY_ORK.PK_OT_BRANDGROUPS 2 2.00200471148267
TABLE ACCESS BY INDEX ROWID ELILILLY_ORK.OT_BRANDGROUPS 1 28 3.00304620318792
INDEX RANGE SCAN ELILILLY_ORK.PK_OT_BRANDGROUPS 2 2.00200471148267
TABLE ACCESS BY INDEX ROWID ELILILLY_ORK.OT_BRANDGROUPS 1 28 3.00304620318792
INDEX RANGE SCAN ELILILLY_ORK.PK_OT_BRANDGROUPS 2 2.00200471148267
TABLE ACCESS BY INDEX ROWID ELILILLY_ORK.OT_BRANDGROUPS 1 28 3.00304620318792
INDEX RANGE SCAN ELILILLY_ORK.PK_OT_BRANDGROUPS 2 2.00200471148267
TABLE ACCESS BY INDEX ROWID ELILILLY_ORK.OT_BRANDGROUPS 1 28 3.00304620318792
INDEX RANGE SCAN ELILILLY_ORK.PK_OT_BRANDGROUPS 2 2.00200471148267
TABLE ACCESS BY INDEX ROWID ELILILLY_ORK.OT_BRANDGROUPS 1 28 3.00304620318792
INDEX RANGE SCAN ELILILLY_ORK.PK_OT_BRANDGROUPS 2 2.00200471148267
TABLE ACCESS BY INDEX ROWID ELILILLY_ORK.OT_BRANDGROUPS 1 28 3.00304620318792
INDEX RANGE SCAN ELILILLY_ORK.PK_OT_BRANDGROUPS 2 2.00200471148267
TABLE ACCESS BY INDEX ROWID ELILILLY_ORK.OT_BRANDGROUPS 1 28 3.00304620318792
INDEX RANGE SCAN ELILILLY_ORK.PK_OT_BRANDGROUPS 2 2.00200471148267
TABLE ACCESS BY INDEX ROWID ELILILLY_ORK.OT_BRANDGROUPS 1 28 3.00304620318792
INDEX RANGE SCAN ELILILLY_ORK.PK_OT_BRANDGROUPS 2 2.00200471148267
TABLE ACCESS BY INDEX ROWID ELILILLY_ORK.OT_BRANDGROUPS 1 28 3.00304620318792
INDEX RANGE SCAN ELILILLY_ORK.PK_OT_BRANDGROUPS 2 2.00200471148267
TABLE ACCESS BY INDEX ROWID ELILILLY_ORK.OT_BRANDGROUPS 1 28 3.00304620318792
INDEX RANGE SCAN ELILILLY_ORK.PK_OT_BRANDGROUPS 2 2.00200471148267
TABLE ACCESS BY INDEX ROWID ELILILLY_ORK.OT_BRANDGROUPS 1 28 3.00304620318792
INDEX RANGE SCAN ELILILLY_ORK.PK_OT_BRANDGROUPS 2 2.00200471148267
TABLE ACCESS BY INDEX ROWID ELILILLY_ORK.OT_BRANDGROUPS 1 28 3.00304620318792
INDEX RANGE SCAN ELILILLY_ORK.PK_OT_BRANDGROUPS 2 2.00200471148267
TABLE ACCESS BY INDEX ROWID ELILILLY_ORK.OT_BRANDGROUPS 1 28 3.00304620318792
INDEX RANGE SCAN ELILILLY_ORK.PK_OT_BRANDGROUPS 2 2.00200471148267
TABLE ACCESS BY INDEX ROWID ELILILLY_ORK.OT_BRANDGROUPS 1 28 3.00304620318792
INDEX RANGE SCAN ELILILLY_ORK.PK_OT_BRANDGROUPS 2 2.00200471148267
TABLE ACCESS BY INDEX ROWID ELILILLY_ORK.OT_BRANDGROUPS 1 28 3.00304620318792
INDEX RANGE SCAN ELILILLY_ORK.PK_OT_BRANDGROUPS 2 2.00200471148267
TABLE ACCESS BY INDEX ROWID ELILILLY_ORK.OT_BRANDGROUPS 1 28 3.00304620318792
INDEX RANGE SCAN ELILILLY_ORK.PK_OT_BRANDGROUPS 2 2.00200471148267
TABLE ACCESS BY INDEX ROWID ELILILLY_ORK.OT_BRANDGROUPS 1 28 3.00304620318792
INDEX RANGE SCAN ELILILLY_ORK.PK_OT_BRANDGROUPS 2 2.00200471148267
TABLE ACCESS BY INDEX ROWID ELILILLY_ORK.OT_MESSAGEGROUPS 1 42 3.00304658697702
INDEX RANGE SCAN ELILILLY_ORK.PK_OT_MESSAGEGROUPS 2 2.00200471148267
DB & OS Info:
Oracle Version : 10.1.0.2.0
OS : Linux
Finally, Here are my questions:
1. Currently, I'm running my queries against 122k rows (data growth rate is ~2million rows per month) . I feel, it's taking too much time for such a small data set. How can i improve the performace of above queries? Or Is there a better way to write them? Since, its in evolution stage, i'm open to restructuring the schema if needed for better performance.
2. Is this correct approach? If not, Is there a better way to solve the above problem?
3. Any suggestions/tips are welcome.
I apologize, for such a lengthy post (my intention was to provide as much information as possible).
Thanks in advance.Org Index Overflow makes it an index organized table (IOT) as distinct from a heap table (HT). In the original design we expected to see some performance enhancements from the use of IOT (In particular when re-serializing entire XML documents that had been persisted with Nested table storage), practice the benefits of IOT over HT in the XML DB use case have been marginal. We still create IOT by default when the tables are generated via Schema Registration, however it is likely that this will become controllable via a Schema Annotation in the not too distant future.
There are cases where the use of IOT causes problems, the most noticalbe of which is where you want to create a Text Index on a specific element or attribute which is mapped to a column in the Nested Table. If the NT is an IOT this is not possible, where if the Nested Table is an HT then there is no problem -
Problem to create Explain Plan and use XML Indexes. Plz follow scenario..
Hi,
Oracle Version - Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit
I have been able to reproduce the error as below:
Please run the following code in Schema1:
CREATE TABLE TNAME1
DB_ID VARCHAR2 (10 BYTE),
DATA_ID VARCHAR2 (10 BYTE),
DATA_ID2 VARCHAR2 (10 BYTE),
IDENTIFIER1 NUMBER (19) NOT NULL,
ID1 NUMBER (10) NOT NULL,
STATUS1 NUMBER (10) NOT NULL,
TIME_STAMP NUMBER (19) NOT NULL,
OBJECT_ID VARCHAR2 (40 BYTE) NOT NULL,
OBJECT_NAME VARCHAR2 (80 BYTE) NOT NULL,
UNIQUE_ID VARCHAR2 (255 BYTE),
DATA_LIVE CHAR (1 BYTE) NOT NULL,
XML_MESSAGE SYS.XMLTYPE,
ID2 VARCHAR2 (255 BYTE) NOT NULL,
FLAG1 CHAR (1 BYTE) NOT NULL,
KEY1 VARCHAR2 (255 BYTE),
HEADER1 VARCHAR2 (2000 BYTE) NOT NULL,
VERSION2 VARCHAR2 (255 BYTE) NOT NULL,
TYPE1 VARCHAR2 (15 BYTE),
TIMESTAMP1 TIMESTAMP (6),
SOURCE_NUMBER NUMBER
XMLTYPE XML_MESSAGE STORE AS BINARY XML
PARTITION BY RANGE (TIMESTAMP1)
(PARTITION MAX
VALUES LESS THAN (MAXVALUE)
NOCOMPRESS
NOCACHE
ENABLE ROW MOVEMENT
begin
app_utils.drop_parameter('TNAME1_PAR');
end;
BEGIN
DBMS_XMLINDEX.REGISTERPARAMETER(
'TNAME1_PAR',
'PATH TABLE TNAME1_RP_PT
PATHS (INCLUDE ( /abc:Msg/product/productType
/abc:Msg/Products/Owner
NAMESPACE MAPPING ( xmlns:abc="Abc:Set"
END;
CREATE INDEX Indx_XPATH_TNAME1
ON "TNAME1" (XML_MESSAGE)
INDEXTYPE IS XDB.XMLINDEX PARAMETERS ( 'PARAM TNAME1_PAR' )
local;Then in Schema2, create
create synonym TNAME1 FOR SCHEMA1.TNAME1
SCHEMA1:
GRant All on TNAME1 to SCHEMA2Now in SCHEMA2, if we try:
Explain Plan for
SELECT xmltype.getclobval (XML_MESSAGE)
FROM TNAME1 t
WHERE XMLEXISTS (
'declare namespace abc="Abc:Set"; /abc:Msg/product/productType= ("1", "2") '
PASSING XML_MESSAGE);WE GET -> ORA-00942: table or view does not exist
whereas this works:
Explain Plan for
SELECT xmltype.getclobval (XML_MESSAGE)
FROM TNAME1 t- Please tell me, what is the reason behind it and how can I overcome it. It's causing all my views based on this condition to fail in another schema i.e. not picking up the XMLIndexes.
Also
SELECT * from DBA_XML_TAB_COLS WHERE TABLE_NAME like 'TNAME1';Output is like:
OWNER, || TABLE_NAME, || COLUMN_NAME, || XMLSCHEMA || SCHEMA_OWNER, || ELEMENT_NAME, || STORAGE_TYPE, || ANYSCHEMA, || NONSCHEMA
SCHEMA1 || TNAME1 || XML_MESSAGE || || || BINARY || NO || YES ||
SCHEMA1 || TNAME1 || SYS_NC00025$ || || || CLOB || ||
- Can I change AnySchema to YES from NO for -column_name = XML_MESSAGE ? May be that will solve my problem.
- SYS_NC00025$ is the XML Index, Why don't I get any values for ANYSCHEMA, NONSCHEMA on it. Is this what is causing the problem.
Kindly suggest.. Thanks..The problem sounds familiar. Please create a SR on http://support.oracle.com for this one.
-
Configuring Web Services for Oracle XML DB
Hi all...
I think I need some help one this subject....
We have a 10G Release 2 Oracle single instance ( not RAC) install on a Linux Redhat v5.3 64 bit server. Are developers are user Visual Studio .Net and wnat to send xml files to a web service so that the xml file (containing data) can call a PL/SQL package (to be written) which will take the data out of the xml input file and insert rows into a prefined table within the instance. Now they have browsed the web and have come upon the following links...
http://docs.oracle.com/cd/B28359_01/appdev.111/b28369/xdb_web_services.htm
http://docs.oracle.com/cd/B28359_01/appdev.111/b28369/xdb22pro.htm#i1026724
Currently, within the database I looked at the schema XDB and have unlocked the account and connected as the user XDB. There are some 680 objects in the following groups...
SQL> select object_type, count(*) from dba_objects where owner='XDB' group by object_type;
OBJECT_TYPE COUNT(*)
SEQUENCE 2
PROCEDURE 5
OPERATOR 8
LOB 334
LIBRARY 12
PACKAGE 20
PACKAGE BODY 17
XML SCHEMA 25
TYPE BODY 5
TRIGGER 12
TABLE 36
INDEX 51
FUNCTION 5
INDEXTYPE 2
VIEW 2
TYPE 144
16 rows selected.
Now in the links above it mentions that the xdbconfig.xml needs to be altered etc. However, I have searched the entire $ORACLE_HOME and there is no file definition of that description.
From a DBA prospective...what do I have to install on the Linux server? I assume from the Oracle Database 10g Companion Products I need to lay down Oracle HTTP Server in a new Oracle home as the first step...or not? Does the HTML DB need to be installed as well?
And for Configuring Web Services for Oracle XML DB...what else has to be installed? And from what product line?
Thanks in Advance....
Cheers
RoegrHi Marco...
First of all ...thanks for the reply.
I followed the link and the infor in that web page. However, there were a few things that did not work....
1. The http://localhost:8080/ as is brought up a web page withe the heading as
==========
ORACLE DATABASE 10g EXPRESS EDITION LICENSE AGREEMENT..
==========
The other browser test ftp://localhost:2100/
did not find any page?
2. Then I went onto running (as the sysdba) the pl/sql to enable the ORAWSV Entry Service
however it error out. So I did a describe on DBMS_XDB and the function deleteServlet does not appear
then I had a look and this link to > http://www.liberidu.com/blog/?p=471
was for 11G and the other link > http://docs.oracle.com/cd/B28359_01/appdev.111/b28369.pdf
was for 11G.
However, we are on 10G
=================
SQL> select * from V$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bi
PL/SQL Release 10.2.0.3.0 - Production
CORE 10.2.0.3.0 Production
TNS for Linux: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production
==================
So is there must be other sql for 10G?
Cheers
Rog -
Use JDBC to Access XML Documents in Oracle XML DB
Hi folks,
From the Oracle XML DB Developer's Guide 10g Release 1 (10.1) Chapter 12 Java API for XMLType, it show several examples for how java application use JDBC to access xml in XMLDB:
1. use getOPAQUE() on XMLTYPE table/column and then call XMLTYPE.createXML();
2. use getCLOBVal()/getStringVal()/getBLOBVal() in SQL statement;
3.use getObject on the result and cast directly to XMLType;
Among these 3 options, which is supposed to be the fastest way? Any difference between thin and oci?
I have run some tests about that and the result is the second option (with thin driver) is the fastest. It surprises me because I think oci should be faster than thin. Does the result make sense?
Thanks.Have you tried to trace your sessions to see how much work is happening? Traces should give you quantifiable information on exact times and access paths to the data.
Below is a link to an O'Reilly book excerpt on Java programming with JDBC. Slightly data, but may be of assistance.
http://www.onjava.com/lpt/a//onjava/excerpt/oraclejdbc_19/index.html -
Recommend Oracle XML Book?
Can anyone recommend an good Oracle XML book. I've checked out "Oracle XML Applications" by O'Reily and have heard good things about it. But it's 3 1/2 years old and doesn't discuss Oracle 9i features and no mention of XML Schema (didn't exist at that point I guess).
Thanks for any advice!!!Hi,
Some of the books which provide good information about Oracle and XML (with a small description) are present at the following links:
1.http://www.xml-book.com/xml-and-oracle-books.html
'Building Oracle XML Applications' by Steve Muench is a good one
Huge documentation is present free on OTN at the following link:
1. http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/nav/docindex.htm#index-XML
Have a look at them. Various basic to advance samples are also present on OTN on XML at
1. http://otn.oracle.com/sample_code/tech/xml/xmldb/content.html
2. http://otn.oracle.com/sample_code/tech/xml/content.html
Check them.
Regards,
Anupama -
is it possible for intermedia to index XML such as:
<PERSON>
<NAME FIRST="STEVE" LAST="DONOVAN"/>
<HAIR COLOR="BROWN" LENGTH="SHORT"/>
<DOB AGE="31">2/7/1968</DOB>
</PERSON>
and then process a query such as:
Who has brown hair?
ie select name from person where hair.color = "BROWN"
Many thanks
nullSearches based upon structural conditions are not yet available
through interMedia text. Also attribute searches are not
supported at this time. For reference you should not put data
in attributes as that will not be compliant with XML Schema when
it becomes a recommendation.
Oracle XML Team
http://technet.oracle.com
Oracle Technology Network
Steve Donovan (guest) wrote:
: is it possible for intermedia to index XML such as:
: <PERSON>
: <NAME FIRST="STEVE" LAST="DONOVAN"/>
: <HAIR COLOR="BROWN" LENGTH="SHORT"/>
: <DOB AGE="31">2/7/1968</DOB>
: </PERSON>
: and then process a query such as:
: Who has brown hair?
: ie select name from person where hair.color = "BROWN"
: Many thanks
null -
Weaknesses I've come across in the Oracle XML/XSL implementation
Weaknesses I've come across in the Oracle XML/XSL implementation
NOTE: I think Oracle is a fantastic database and the XML implementation is lovely to use - also I know these are not limited to XE and also that some are fixed in 11g enterprise however I'm not sure if all are so I am posting here in the hope that Oracle will include fixes for all if any have been missed
1. getclobval() returns a spurious carriage return on end of the value returned
2. extract does not handle mixed content tags well (for example it simply discards tags that only have whitespace between them
3. XSL: using a xsl:number level="multiple" with anything beyond a simple count= xpath value crashes the database completely
4. XSL: insists on pretty printing output XML which is extremely odd behaviour and causes problems when dealing with mixed contentAnother weakness I've seen is with the appendchildxml function and mixed content xml - it appears to likewise pretty print XML causing the injection of carriage returns and whitespace into mixed content nodes
-
Lost iCloud Pages Document because of xml index missing- finally resolved!
This morning I opened a Pages document in the cloud and started making changes to it the same as I have a hundred times in the past. The dreaded spinning ball appeared and I force quit Pages. Upon trying to open the same document I got the dreaded "xml index is missing". I callled tech support and was told by the first person that there is no way to recover the document. I also asked if Time Machine would have backed it up and he said NO, there is no way of recovering it if I didn't make a copy of it. I called Apple Support again and this time talked to a lady who at least tried to help me, but we weren't making any progress. I then found an article online (after searching earlier for the xml issue) that said Time Machine DOES backup Mobile Documents under the ~Library/Mobile Documents unless you specifically tell it not to. Luckily this person insisted that it backs up mobile documents because I was able to recover the document from a Time Machine backup. Thank you to the person who posted about the Time Machine backup! Now Apple needs to let their Tech Support people know about this!
Hank,
You were wise to search for answers here. There's no doubt that there is more collective wisdom in these discussions than you would expect to encounter in one first-echelon phone support person. You are also wise to be using TimeMachine so you have that recovery option available to you.
Jerry
Maybe you are looking for
-
Issues exporting versions from tiff files
I upgraded to Aperture 3 [3.0.2] running on 10.6. Aperture works fine, except when trying to export a version of a tiff file [these are 8 bit 200mb scans]. Exporting a master from a tiff file works, exporting versions from RAW files work, but Apertur
-
Script for purge RAM in Mavericks
In 10.7 Lion I made and script in Automator for apply purge command when I want to free up the RAM memory. I´ve been whatching that in Mavericks is necesary to put sudo before purge and then Terminal ask for the password. The question is: How can I m
-
Best way to resise redo logfiles?!!
Hi, I have Oracle 10g installed on AIX 5.2, and when I was checking average timing of logs switches; I found that a log switch is happening every 179 min.; which, as per Oracle, is too long interval for a log switch to occur (it should be between 20-
-
Second max/min in ssrs report builder expression
I need to do conditional formatting on second max/min in an ssrs report builder table. Can i get it in an expression ?
-
Quicktime in Golive is activex in dreamweaver
I used GoLive successfully on my own large multimedia website for several years. Got a message that Adobe no longer supports GoLive so i bought Dreamweaver. All the films on my site were created using Golive's quicktime placeholders. Now i notice tha