Oracle XDK 组件 说明

2024-04-04 02:08
文章标签 oracle 组件 说明 xdk

本文主要是介绍Oracle XDK 组件 说明,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

 

一.Oracle XDK 组件 说明

 

在说明之前,我们先用如下SQL查看一下DB中的组件:

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 说明:

Oracle 8i/9i/10g/11g 组件(Components) 说明

http://www.cndba.cn/Dave/article/1445

 

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. 

--Oracle XDK 组件是一个多功能集合的组件,其可以构建和部署C,C++,Java 程序来处理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 为XML的解决方案提供了基础。 XDK 支持XML DB,XDB是一个技术的集合,其可以用来在DB中存储和处理XML。 我们可以使用XDK 和XDB来构建应用在DB中运行,也可以单独使用XDK。

 

OracleXDB 组件 重建 说明

http://www.cndba.cn/Dave/article/1324

 

The Oracle XDKis fully supported by Oracle Corporation and comes with a commercialredistribution license. The standard installation of Oracle Database includesthe XDK. 

 

注意:

(1)Customersusing Oracle XDK with PL/SQL and migrating from Oracle Database Release 8.1 or9.2 are strongly encouraged to use AL32UTF8 as the database character set.Otherwise, issues can arise during PL/SQL processing of XML data that containsescaped entities. 

--在Oracle 8.1和9.2中强烈建议AL32UTF8字符集。

 

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

 

XDK 用户:

SYS: In 9.2 XDK should be installed in SYSschema, as 9.2.0.* patchsets upgrade XDK installed in SYS schemaonly.  

       --从Oracle 9.2 开始,XDK 只安装到SYS 用户。

 

官网的其他文档:

 XML DB Developer's Guide,10g Release 2 (10.2) 
Introduction to Oracle XMLDeveloper's Kit (11gR2)

 

 

二. XDK 卸载

MOS:

Note.317176.1 Howto De-install corrupted 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

--检查XDK 用户:

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 corrupt and you need to follow  re-installsteps

--如果这里包显示无效,那么XDK 就corrupt,需要重建XDK。

 

2) For each user that owns XDK executebelow function to find out the version

--每个XDK用户执行如下函数,来确认版本信息:

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 should be installed in 9204 database, 9207 XDK should be installedin 9205 database and 9208 XDK should 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 should be installed inthe SYS schema, as 9.2.0.* patchsets upgrade the XDK installed in the SYSschema only.

       --在Oracle 9.2 中,XDK 需要安装在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

       --如果XDK 已经安装到了其他目录,那么使用如下步骤可以转移到SYS 用户。

 

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 corrupted oryou have wrong version of XDK in SYS schema then follow below steps tode-install and install

       --如果XDK 已经正确安装到了SYS用户,但是XDK 版本错误,那么需要卸载XDK 然后重新安装。

 

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 should 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> @xmldrop.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 corrupt 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



注意事项:

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 XSLPROCESSOR 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

 

 

三. XDK 组件安装

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 included in Oracle XML Database (XDB). 

--从Oracle10g 开始,不需要安装XDK组件,其已经包含在XDB组件中。

 

So, to install the XDK Java, XDB should beinstalled first . 

--所以如果要安装XDK,XDB 需要先安装。

 

关于XDB安装,参考:

OracleXDB 组件 重建 说明

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):

--如果JServer 安装正确,但是XDK 无效,可以通过如下SQL 查询:

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';


注:这里的Jserver 是JVM组件的一个子集。

 

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

--可以执行如下脚本重建XDK 组件:

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 :

--如果执行initxml.sql,遇到如下错误,可能JavaVM组件没有正确安装。

BEGIN dbms_java.loadjava('-v -r -grantPUBLIC -s rdbms/jlib/servlet.jar'); END; 


ERROR at line 1: 
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: 
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: 
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 

 

重装JavaVM组件即可,具体参考:

OracleJAVAVM 组件Reload 说明

http://www.cndba.cn/Dave/article/1328

 

 

四.验证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 should 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; 

 

 

XML 与XDK 的常见问题参考:

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 

 

 

 

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

版权所有,文章允许转载,但必须以链接方式注明源地址,否则追究法律责任!

QQ:492913789

Email:ahdba@qq.com

Blog:  http://www.cndba.cn/dave

Weibo: http://weibo.com/tianlesoftware

Twitter: http://twitter.com/tianlesoftware

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

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

 

-------加群需要在备注说明Oracle表空间和数据文件的关系,否则拒绝申请----

DBA1 群:62697716(满);   DBA2 群:62697977(满)  DBA3 群:62697850(满)  

DBA 超级群:63306533(满);  DBA4 群:83829929   DBA5群: 142216823

DBA6 群:158654907    DBA7 群:172855474   DBA总群:104207940

这篇关于Oracle XDK 组件 说明的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/874546

相关文章

Before和BeforeClass的区别及说明

《Before和BeforeClass的区别及说明》:本文主要介绍Before和BeforeClass的区别及说明,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录Before和BeforeClass的区别一个简单的例子当运行这个测试类时总结Before和Befor

Python pip下载包及所有依赖到指定文件夹的步骤说明

《Pythonpip下载包及所有依赖到指定文件夹的步骤说明》为了方便开发和部署,我们常常需要将Python项目所依赖的第三方包导出到本地文件夹中,:本文主要介绍Pythonpip下载包及所有依... 目录步骤说明命令格式示例参数说明离线安装方法注意事项总结要使用pip下载包及其所有依赖到指定文件夹,请按照以

Oracle修改端口号之后无法启动的解决方案

《Oracle修改端口号之后无法启动的解决方案》Oracle数据库更改端口后出现监听器无法启动的问题确实较为常见,但并非必然发生,这一问题通常源于​​配置错误或环境冲突​​,而非端口修改本身,以下是系... 目录一、问题根源分析​​​二、保姆级解决方案​​​​步骤1:修正监听器配置文件 (listener.

Spring组件实例化扩展点之InstantiationAwareBeanPostProcessor使用场景解析

《Spring组件实例化扩展点之InstantiationAwareBeanPostProcessor使用场景解析》InstantiationAwareBeanPostProcessor是Spring... 目录一、什么是InstantiationAwareBeanPostProcessor?二、核心方法解

Spring中管理bean对象的方式(专业级说明)

《Spring中管理bean对象的方式(专业级说明)》在Spring框架中,Bean的管理是核心功能,主要通过IoC(控制反转)容器实现,下面给大家介绍Spring中管理bean对象的方式,感兴趣的朋... 目录1.Bean的声明与注册1.1 基于XML配置1.2 基于注解(主流方式)1.3 基于Java

C++ RabbitMq消息队列组件详解

《C++RabbitMq消息队列组件详解》:本文主要介绍C++RabbitMq消息队列组件的相关知识,本文给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友参考下吧... 目录1. RabbitMq介绍2. 安装RabbitMQ3. 安装 RabbitMQ 的 C++客户端库4. A

PyQt6中QMainWindow组件的使用详解

《PyQt6中QMainWindow组件的使用详解》QMainWindow是PyQt6中用于构建桌面应用程序的基础组件,本文主要介绍了PyQt6中QMainWindow组件的使用,具有一定的参考价值,... 目录1. QMainWindow 组php件概述2. 使用 QMainWindow3. QMainW

Oracle 通过 ROWID 批量更新表的方法

《Oracle通过ROWID批量更新表的方法》在Oracle数据库中,使用ROWID进行批量更新是一种高效的更新方法,因为它直接定位到物理行位置,避免了通过索引查找的开销,下面给大家介绍Orac... 目录oracle 通过 ROWID 批量更新表ROWID 基本概念性能优化建议性能UoTrFPH优化建议注

PostgreSQL 序列(Sequence) 与 Oracle 序列对比差异分析

《PostgreSQL序列(Sequence)与Oracle序列对比差异分析》PostgreSQL和Oracle都提供了序列(Sequence)功能,但在实现细节和使用方式上存在一些重要差异,... 目录PostgreSQL 序列(Sequence) 与 oracle 序列对比一 基本语法对比1.1 创建序

idea报错java: 非法字符: ‘\ufeff‘的解决步骤以及说明

《idea报错java:非法字符:‘ufeff‘的解决步骤以及说明》:本文主要介绍idea报错java:非法字符:ufeff的解决步骤以及说明,文章详细解释了为什么在Java中会出现uf... 目录BOM是什么?1. BOM的作用2. 为什么会出现 \ufeff 错误?3. 如何解决 \ufeff 问题?最