Oracle xdk Component Description

Source: Internet
Author: User

 

1. Oracle xdk Component Description

 

Before the description, we first use the following SQL statement to check the components in the database:

SQL> Col comp_id for A15

SQL> Col version for A15

SQL> Col comp_name for A30

SQL> select comp_id, comp_name, versionfrom dba_registry;

 

Comp_id comp_name version

------------------------------------------------------------

XDB Oracle XML database 11.2.0.3.0

Amd olap catalog 11.2.0.3.0

Em Oracle Enterprise Manager 11.2.0.3.0

SDO spatial 11.2.0.3.0

Ordim Oracle multimedia 11.2.0.3.0

Context Oracle Text 11.2.0.3.0

ODM Oracle Data Mining 11.2.0.3.0

Exf Oracle Expression Filter 11.2.0.3.0

RUL Oracle Rules Manager 11.2.0.3.0

Owm Oracle Workspace Manager 11.2.0.3.0

Catalog Oracle Database catalog views 11.2.0.3.0

 

Comp_id comp_name version

------------------------------------------------------------

Catproc Oracle database packages and t11.2.0.3.0

Ypes

 

JavaVM jserver Java Virtual Machine 11.2.0.3.0

XML Oracle xdk 11.2.0.3.0

Catjava Oracle Database Java packages 11.2.0.3.0

Xoq Oracle olap api 11.2.0.3.0

Aps olap analytic workspace 11.2.0.3.0

 

17 rows selected.

 

Mos description:

Oracle 8i/9i/10g/11g component (components) Description

Http://blog.csdn.net/tianlesoftware/article/details/5937382

 

Oracle oraclexml developer's kit (xdk) is a versatile set of components that enables you tobuild and deploy C, C ++, and Java software programs that process XML. you canassemble these components into an XML application that serves your businessneeds.

-- The Oracle xdk component is a multi-function set component that can be used to build and deploy C, C ++, and Java programs to process XML.

 

Oracle xdkprovides the foundation for the Oracle XML solution. the xdk supports oraclexml dB, which is a set of technologies used for storage and processing of xmlin the database. you can use the xdk in conjunction with Oracle xml db to buildapplications that run in Oracle Database. you can also use the xdkindependently of xml db.

-- Oracle xdk provides the foundation for XML solutions. Xdk supports xml db. XDB is a collection of technologies that can be used to store and process XML in dB. We can use xdk and XDB to build and run applications in dB, or use xdk separately.

 

Oraclexdb component reconstruction description

Http://blog.csdn.net/tianlesoftware/article/details/7323139

 

The Oracle xdkis fully supported by Oracle Corporation and comes with a license cialredistribution license. The standard installation of Oracle Database includesthe xdk.

 

Note:

(1) customersusing Oracle xdk with PL/SQL and migrating from Oracle Database Release 8.1 or9.2 are stronugly encouraged to use al32utf8 as the database character set. otherwise, issues can arise during PL/SQL processing of XML data that containsescaped entities.

-- The al32utf8 character set is strongly recommended in Oracle 8.1 and 9.2.

 

(2) 9206 xdkshocould be installed in 9204 database, 9207 xdk shocould be installed in 9205 database and 9208 xdk shocould be installed in 9206 server. That is why in9.2.0.8 installation you will see xdk version 9.2.0.10

 

Xdk users:

SYS: In 9.2 xdk shocould be installed in sysschema, as 9.2.0. * patchsets upgrade xdk installed in SYS schemaonly.

-- Starting from Oracle 9.2, xdk is only installed to SYS users.

 

Other documents on the Official Website:

Xml db developer's guide, 10g Release 2 (10.2)
Introduction to Oracle xmldeveloper's kit (11gr2)

 

 

Ii. Uninstall xdk

Mos:

Note.317176.1 howto de-install specified upted PL/SQL xdk in 9.2 and install the right version

Note.171658.1 howto install and uninstall the XML developers Toolkit

 

1) Let's check which User owns thexdk. To find out execute this query as sys

-- Check xdk users:

SQL> select owner, dbms_java.longname (object_name), object_type, status from all_objects where dbms_java.longname (object_name) Like ('% xmlparser %') and object_type like '% Java % ';

 

Note:-If the packagesshow up as invalid then xdk is already upt and you need to follow re-installsteps

-- If the package is invalid, the xdk will be upt and the xdk needs to be rebuilt.

 

2) for each user that owns xdk executebelow function to find out the version

-- Each xdk user executes the following function to confirm the version information:

SQL> Create or replace functionxmlversion return varchar2
Is language Java name 'oracle. xml. parser. v2.xmlparser. getreleaseversion () returns java. Lang. string ';

/

SQL> select xmlversion from dual;

3) 9206 xdk shoshould be installed in 9204 database, 9207 xdk shoshould be installedin 9205 database and 9208 xdk shoshould be installed in 9206 server.

If the xdk isinstalled in only sys schema and you have right xdk version then no need tocontinue further ....

 

4) In 9.2, The xdk shoshould be installed inthe sys schema, as 9.2.0. * patchsets upgrade the xdk installed in the sysschema only.

-- In Oracle 9.2, xdk must be installed under sys.

 

5) If you have xdk installed in any schemaother than sys, then follow below steps to successfully install the rightversion of xdk in SYS Schema

-- If xdk has been installed in another directory, you can use the following steps to transfer it to the Sys user.

 

A) if the user owning xdk just has xdkcomponents and no custom code then drop the user owning xdk using cascadeoption

 

B) Now, as sys, check if any other schemahas xdk installed

SQL> select owner, dbms_java.longname (object_name), object_type, status from all_objects where dbms_java.longname (object_name) Like ('% xmlparser %') and object_type like '% Java % ';

 

C) if the above query show that Sys hasalready the right version of xdk installed then stop here .....

Otherwise Continue

For both UNIX and windows as sys executebelow command

SQL> [ORACLE_HOME]/rdbms/admin/initxml. SQL

D) Installation Complete and no need tocontinue further ..

 

6) if current xdk in sys is already upted oryou have wrong version of xdk in SYS schema then follow below steps Tode-install and install

-- If the xdk has been correctly installed to the Sys user but the xdk version is incorrect, you need to uninstall the xdk and reinstall it.

 

I) To de-install xdkinstalled from technet you need to have right version of jar files I. E say you have 9.2.0.6 xdk installed in a 9.2.0.6 database (rightxdk shocould be 9.2.0.8) Then you need to have 9.2.0.6 xdk files to drop thecurrent xdk. with below steps I will assume you have 9.2.0.6 xdk in 9.2.0.6database and we are going to de-install 9.2.0.6 xdk and install 9.2.0.8 xdk

A) download 9.2.0.6 xdk from technet

Http://www.oracle.com/technology/tech/xml/xdk/software/prod/xdk_plsql.html

Install it in some directory on thedatabase box.

 

B) CD to xdk_home/xdk/Admin directory

 

C) log in as sys and execute below commands

SQL> @ xmlddrop. SQL
 
SQL> Drop package dbms_xmlquery;
SQL> Drop package dbms_xmlsave;
SQL> Drop package xmlgen;
SQL> drop public synonym dbms_xmlquery;
SQL> drop public synonym dbms_xmlsave;
SQL> drop public synonym xmlgen;
SQL> exit

D) CD to xdk_home/lib and issue a dropjava command for each of the followingjava Archives

./Xdk/lib/xschema. Jar
./Xdk/lib/xsu12.jar
./Xdk/lib/classgen. Jar
./Xdk/lib/xmlparserv2.jar
./Xdk/lib/xmlplsql. Jar

Eg. dropjava-v-uuser/password xdk/lib/xschema. Jar

 

E) deinstall is complete. Now you can loginand check if any version of xdk is installed

 

F) to install xdk as sys executebelow command

SQL> [ORACLE_HOME]/rdbms/admin/initxml. SQL


Ii) To de-install unzip upt 9.2 xdk that is installedfrom $ Oh follow below steps

A) CD to $ Oh

B) log in as sys and execute below commands

SQL> @ rdbms/admin/rmxml. SQL
 
SQL> Drop package dbms_xmlquery;
SQL> Drop package dbms_xmlsave;
SQL> Drop package xmlgen;
SQL> drop public synonym dbms_xmlquery;
SQL> drop public synonym dbms_xmlsave;
SQL> drop public synonym xmlgen;
SQL> exit

D) CD to $ Oh and issue a dropjava command for each of the following javaarchives

./Lib/xschema. Jar
./Lib/xsu12.jar
./Lib/classgen. Jar
./Lib/xmlparserv2.jar
./Rdbms/jlib/XDB. Jar
./Rdbms/jlib/servlet. Jar
./Lib/xmlplsql. Jar

Eg. dropjava-v-uuser/password./lib/xschema. Jar

 

E) deinstall is complete. Now you can loginand check if any version of xdk is installed

 

F) to install xdk as sys executebelow command

SQL> [ORACLE_HOME]/rdbms/admin/initxml. SQL

Note:

In 9ir2, The xdkfor PL/SQL written in Java has been deprecated and in 10i it is no longersupported

Starting with9.2 Oracle introduced xdk for PL/SQL written in C/C ++ which is referred asxdb/xmltype. the packages xmldom, xmlparser and your processor have been replacedby the new names as dbms_xmldom, dbms_xmlparser and dbms_xslprocessor.

The new packageshave the same methods and functionality and support the same interfaces using cinstead of Java. In 10i there will be synonyms created to the oldpackages to provide backward compatibility.

In 9.2 you havethe option to either use PL/SQL xdk written in C or Java.

In order toinstall XDB refer to Note 1292089.1

 

 

Iii. Install xdk Components

Note.435999.1 howto install xdk 10.2.0.x?
Note.277152.1 howto install xdk 9.2.0.x in an 8.1.7 database cleanly
Note.453050.1 howto verify the xdk Installation
Installing the xdk (11gr2)

There is no needto install xdk Java in 10g Database as it comes with XDB schema. In 10g, muchabout xdk has been encoded in Oracle XML database (XDB ).

-- Xdk components are included in XDB components, which are not required to be installed since Oracle10g.

 

So, to install the xdk Java, XDB shoshould beinstalled first.

-- To install xdk, XDB must be installed first.

 

For XDB installation, refer:

Oraclexdb component reconstruction description

Http://blog.csdn.net/tianlesoftware/article/details/7323139

 

If thejserver is installed correctly but the xdk component is not, for example it isinvalid, (which can be shown by the following SQL statement ):

-- If jserver is correctly installed but xdk is invalid, You can query it using the following SQL statement:

Column comp_name format A30
Column version format A20
Column status format A20

Select comp_name, version, status from dba_registry where comp_name = 'oracle xdk ';

Note: The jserver here is a subset of JVM components.

 

Then execute the following scripts tore-install the xdk component.

-- Execute the following script to recreate the xdk component:

Connected as sysdba.

$ ORACLE_HOME/xdk/admin/rmxml. SQL
$ ORACLE_HOME/xdk/admin/initxml. SQL

 

 

But afterrunning initxml. SQL, if following error is encountered, then thejavavm is not installed correctly:

-- If you encounter the following error when executing initxml. SQL, The JavaVM component may not be correctly installed.

Begin dbms_java.loadjava ('-v-r-grantpublic-s rdbms/jlib/servlet. jar'); end;

*
Error at line 1:
The ORA-29532: Java Call terminated by uncaught Java exception:
Java. Lang. nullpointerexception
ORA-06512: At "SYS. dbms_java", line 222
ORA-06512: At line 1

Begin dbms_java.loadjava ('-v-r-install-grant public-s lib/xmlparserv2.jar
Rdbms/jlib/XDB. jar'); end;

*
Error at line 1:
The ORA-29532: Java Call terminated by uncaught Java exception:
Java. Lang. nullpointerexception
ORA-06512: At "SYS. dbms_java", line 222
ORA-06512: At line 1

Begin dbms_java.loadjava ('-v-r-grant public-s lib/xsu12.jar'); end;

*
Error at line 1:
The ORA-29532: Java Call terminated by uncaught Java exception:
Java. Lang. nullpointerexception
ORA-06512: At "SYS. dbms_java", line 222
ORA-06512: At line 1

 

Reinstall the JavaVM component. For details, refer:

Reload description of oraclejavavm component

Http://blog.csdn.net/tianlesoftware/article/details/7334414

 

 

4. Verify the installation of xdk

 

1. Verify there are no invalid Java classesthat start with name "Oracle/XML" by querying the all_objectsview.
SQL> select substr (dbms_java.longname (object_name), 1, 30) as class, statusfrom all_objects where object_type = 'java class' and status = 'invalid ';

2. Verify installation of the Oracle XML Parser for Java (I. e xmlparserv2.jar)
SQL> select substr (dbms_java.longname (object_name), 1, 30) as class, statusfrom all_objects where object_type = 'java class' and object_name = dbms_java.shortname ('oracle/XML/parser/v2/domparser ');

You shoshould see the following result:

Class status
-----------------------------------------
Oracle/XML/parser/v2/domparser valid

3. Verify the PL/SQL wrapper packages are created for the Oracle XML Parser
For PL/SQL

Desc xmlparser;
Or
Desc xmldom;

4. Verify the PL/SQL wrapper packages are created for the Oracle XML sqlutility

Desc dbms_xmlquery;
Or
Desc dbms_xmlsave;

 

 

For FAQs about XML and xdk, refer:

Note 250288.1 xdk for PL/SQL API has been deprecated from 9.2 Database
Note.103871.1 XML Parser for PL/SQL FAQs
Note.103872.1 XML Parser for Java version 2-Frequently Asked Questions

 

 

 

Bytes -------------------------------------------------------------------------------------------------------

All rights reserved. reprinted articles are allowed, but source addresses must be indicated by links. Otherwise, the documents will be held legally responsible!

Skype: tianlesoftware

Email: tianlesoftware@gmail.com

Blog: http://www.tianlesoftware.com

WEAVER: http://weibo.com/tianlesoftware

Twitter: http://twitter.com/tianlesoftware

Facebook: http://www.facebook.com/tianlesoftware

LinkedIn: http://cn.linkedin.com/in/tianlesoftware

 

------- Add a group to describe the relationship between Oracle tablespace and data files in the remarks section. Otherwise, reject the application ----

Dba1 group: 62697716 (full); dba2 group: 62697977 (full) dba3 group: 62697850 (full)

Super DBA group: 63306533 (full); dba4 group: 83829929 dba5 group: 142216823

Dba6 group: 158654907 dba7 group: 172855474 DBA group: 104207940

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.