昨晚做全库impdp导入时,发现有些表使用了xml的存放。导致导入的时候表都无法创建。
因dbca建库的只安装了jvm组件,所以需要安装XML DB组件。
安装步骤如下:
- Confirm XML DB is not already installed.
- SELECT username FROM DBA_USERS where username = 'XDB'; returns 0 rows.@H_502_16@
- DESCRIBE RESOURCE_VIEW fails.@H_502_16@
- As SYS,perform the XML DB installation - Note: this will not be a complete build due to Oracle Bug 9818995:
- @?/rdbms/admin/catqm.sql xdb <xml db tablespace> <xdb temp tablespace> <use secure files yes|no>@H_502_16@
- As SYS,grant the relevent permissions to the XDB user: @H_502_16@
- As SYS,ensure their are no invalid objects: @H_502_16@
- Assuming an spfile is in use,as SYS configure the XDB dispatcher:
- ALTER SYSTEM SET DISPATCHERS="(PROTOCOL=TCP)(SERVICE=<SID>XDB)" SCOPE=both;@H_502_16@
- If init.ora is in use,edit the init.ora file instead.@H_502_16@
- As SYS,install the missing contents caused by Oracle Bug 9818995:
- SHUTDOWN IMMEDIATE;@H_502_16@
- STARTUP UPGRADE@H_502_16@
- @?/rdbms/admin/xsdbmig.sql@H_502_16@
- SHUTDOWN IMMEDIATE;@H_502_16@
- STARTUP@H_502_16@
- As SYS,ensure their are no invalid objects: @H_502_16@
- As SYS,confirm the XML DB is now fully installed by running the following query and returning the following output:@H_502_16@
SELECT object_value FROM xdb.xs$securityclass WHERE EXTRACTVALUE(object_value,'/securityClass/@targetNamespace')='http://xmlns.oracle.com/plsql' AND EXTRACTVALUE(object_value,'/securityClass/@name')='network' / OBJECT_VALUE -------------------------------------------------------------------------------- <securityClass xmlns="http://xmlns.oracle.com/xs" xmlns:dav="DAV:" xmlns:plsql="