How to Deinstall and Reinstall XML Database

系统 1700 0

Csdn 论坛的一个朋友发了贴,说是 exp 的时候报错。错误信息如下:

EXP-00056:ORACLEerror4063encountered
ORA-04063:packagebody"XDB.DBMS_XDBUTIL_INT"haserrors
ORA-06508:PL/SQL:couldnotfindprogramunitbeingcalled:"XDB.DBMS_XDBUTIL_INT"
ORA-06512:atline1
EXP-00056:ORACLEerror4063encountered
ORA-04063:packagebody"XDB.DBMS_XDBUTIL_INT"haserrors
ORA-06508:PL/SQL:couldnotfindprogramunitbeingcalled:"XDB.DBMS_XDBUTIL_INT"
ORA-06512:atline1
EXP-00000:Exportterminatedunsuccessfully

一看又是 XDB.DBMS_XDBUTIL_INT 包的问题。 之前也看到过这个问题,也整理了篇文章来说明:

Oracle9iEXPXDB.DBMS_XDBUTIL_INTmustbedeclared
http://blog.csdn.net/tianlesoftware/archive/2010/04/17/5491811.aspx

楼主说这个对象是无效的,并且不能编译。 看来就只能重新安装了。在 metalink 上搜了一下。相关信息如下。


HowtoDeinstallandReinstallXMLDatabase(XDB)[ID243554.1]

Appliesto:

OracleServer-EnterpriseEdition-Version:9.2.0.1to10.2.0.5
OracleServer-PersonalEdition-Version:9.2.0.1to10.2.0.5
OracleServer-StandardEdition-Version:9.2.0.1to10.2.0.5
Informationinthisdocumentappliestoanyplatform.

Purpose

ThisarticleprovidesthestepstomanuallydeinstallandinstalltheXMLDatabasefeatureintoadatabasethatisversion9iR2through10grelease2.THISNOTEISNOTFOR11Gandabove.

WARNINGFORALLREADERS:IftheXMLDBfeaturesarecurrentlybeingutilizedandyouhaveexperiencedaninvalidXMLDBrepositoryorinstallation,point-in-timerecoverytoapointpriortowhentheproblemoccurredisrecommended.XDBshouldnotbereinstalledifthefeatureisbeingused.PleaseconfirmwhetherXDBisbeingusedinyourenvironmentpriortoattemptingreinstall.

Inaddition,thefollowingDBfeaturesalsouseXDB:OracleIntermediaEXIFmetadata,OracleGEORASTER,EXFSYS,OracleLocator

WARNINGFOR10gR2:Forversions10.2andnewer,ifXDBisinvalidthexdbrelod.sqlscriptshouldbeattemptedfirst.Reinstallationproceduresshouldonlybeperformedwhenxdbrelod.sqlwasnotsuccessfulinresolvingtheissue.

WARNINGFOR11G:ThisNoteisnotfor11g.

ScopeandApplication

ThisarticleisforDBA'sthatneedtoremove,installand/orreinstalltheXDBfeatureintoanexistingOracledatabase.
HowtoDeinstallandReinstallXMLDatabase(XDB)

XDBReloadProceduresfor10.2andabove.

SQL>conn/assysdba

SQL>ShutdownImmediate;

SQL>Startupupgrade;

SQL>@?/rdbms/admin/xdbrelod.sql

alternativelyxdbpatch.sqlcanberunbothxdbpatchandxdbrelodperformthesameactions.

SQL>ShutdownImmediate;

SQL>Startup

SQL>@?/rdbms/admin/utlrp.sql

Thenchecktheerrorconditionsthatnecessitatedthestepsinthefirstplace.Iftheerrorconditionisnotresolvedconsiderpointintimerecoverybacktobeforetheerrorstateexisted.Ifthatisnotanoptionproceedtoremovalandreinstallifonversion10.2andbelowandyouhavereadallthewarnings.

XDBSCHEMAREMOVALSTEPS:

WARNING:ThestepstoremovetheXMLDatabasefeature(XDBschema)willcompletelyremovetheXDBrepositoryincludinganyuserdefinedinformationcontainedwithinit.
Therefore,ifthereareanyregisteredschemasorXMLDatabaseitemscreated,youwillberequiredtorecreateallofyouruserdefinedstructures,dataandre-registerallschemaspreviouslyregistered.

IfyouarerunningOracleApplicationswithiSetupseeNOTE:402785.1linkedbelow.

WARNING:Ifyouareondatabaserelease10.1.xor10.2.xtheXDBFeatureisMandatoryinordertouseanyofthememberfunctionsoftheXMLTYPE.Thisistrueevenifyouarenotusingtherepository,orregisteredschemaaspectsoftheXDBfeature.

WARNING:Thisisnotfor11g.

1.Shutdownandrestartthedatabase.
2.Connectassysdbaandrunthecatnoqm.sqlscript.Maintainaspoolofthe
scriptrunning:

UNIX:$ORACLE_HOME/rdbms/adminsubdirectory
WINDOWS:$ORACLE_HOME/rdbms/adminsubdirectory


ForExample:

SQL>setechoon
SQL>spoolxdb_removal.log
SQL>@?/rdbms/admin/catnoqm.sql

3.Modifytheinit.orafileorspfiletoincludethefollowingminimumstopreparetheDBforreinstallingtheXDBschema:

shared_pool_size=150M
java_pool_size=150M

4.TurnonAUTOEXTENDontheXDBtablespace.
Ifyoudonotwanttodothis,makesureyoutargetatablespacewithat
least
.100MBoffreespacefornon-UTF8DB
.150MBoffreespaceforanAL32UTF8DB

5.Shutdownthedatabaseimmediate,andstartupthedatabasenormal

NOTE:FailuretorestartthedatabaseatthisstepcancauseXDBcatqm.sqlinstallationtofailwithaninternalerrorsimilartothefollowing:ORA-7445[qmr_hdl_copy()+48]


XDBSCHEMAINSTALLSTEPS:

1.Connectassysdbaandrunthecatqm.sqlscript.Maintainaspoolofthe
scriptrunning:

UNIX:$ORACLE_HOME/rdbms/adminsubdirectory
WINDOWS:$ORACLE_HOME/rdbms/adminsubdirectory

Thecatqm.sqlscriptrequiresthefollowingparametersbepassedtoitwhen
run:
A.XDBuserpassword
B.XDBuserdefaulttablespace(Youcanuseanytablespaceotherthansystemundoandtemp.Thistablespacehastoexistpriortorunningthescript.)
C.XDBusertemporarytablespace
Thereforethesyntaxtoruncatqm.sqlwillbe:
SQL>catqm.sqlABC

ForExample:
SQL>setechoon
SQL>spoolxdb_install.log
SQL>@?/rdbms/admin/catqm.sqlXDBXDBTEMP

TheFollowingStepisforRelease9.2.xONLYskiptostep3ifrunning10.1.xorabove

2.ReconnecttoSYSagainandrunthefollowingtoloadtheXDBjavalibrary.

SQL>@?/rdbms/admin/catxdbj.sql

NOTE:InordertoloadtheXDBjavalibrariesincatxdbj.sql,youmustfirsthaveavalidJavaVirtualMachineinstallationintheDB(JVM)andavalidXDK.
Also,makesurethatthedatabaseisstartedwithOracle9iRelease2(9.2.0)compatibilityorhigherfordatabaseversion9.2

3.Ifthefollowinglineisnotalreadyapartofthedatabasesystemparameters(init.ora/spfile).
NOTE: PLEASEREPLACE,instanceid1,2etcwithyouractualvalues

a.Non-RAC
dispatchers="(PROTOCOL=TCP)(SERVICE=<SID>XDB)"
b.RAC
instanceid1.dispatchers="(PROTOCOL=TCP)(SERVICE=<SID>XDB)"
instanceid2.dispatchers="(PROTOCOL=TCP)(SERVICE=<SID>XDB)"
etc...
c.IfyouarenotusingthedefaultListenerensureyouhavesetLOCAL_LISTENERinthe(init.ora/spfile)
asprescribedforRAC/NON-RACinstancesortheendpointswillnotregister.

4.CheckforanyinvalidXDBownedobjects:

SQL>selectcount(*)fromdba_objects whereowner='XDB'andstatus='INVALID';
COUNT(*)
----------
0

5.CheckDBA_REGISTRYforXDBstatus:

SQL>selectcomp_name,status,versionfromDBA_REGISTRYwherecomp_name='OracleXMLDatabase'

Theresultsshouldindicatethecorrectversionandpatchinavalidstatus.

6.RestartdatabaseandlistenertoenableOracleXMLDBprotocolaccess.

NOTE:

Ifforanyreasonthecatqm.sqlscriptfailsyoucanrepeatthesteps.HoweverdoingsoMayresultin:

ORA-04098:trigger'SYS.XDB_INSTALLATION_TRIGGER'isinvalidandfailedre-validation

Ifthisoccursfollowthestepsinarticle:

NOTE:331378.1 -Runningcatqm.sqlLeadstoORA-4098Trigger'SYS.XDB_INSTALLATION_TRIGGER'isInvalid

Click here tolearnaboutXDB/XMLtrainingfromOracleUniversity.

References

NOTE:402785.1 -iSetupdependencywithDeinstallandReinstallofXMLDB
NOTE:558834.1 -HowToRe-registerXMLSchemasAfterXDBHasBeenRe-installed?
NOTE:742014.1 -XDB11gInstallandDeinstallNote

<!--EndFragment-->

How to Deinstall and Reinstall XML Database ORA-04063 XDB.DBMS_XDBUTIL_INT


更多文章、技术交流、商务合作、联系博主

微信扫码或搜索:z360901061

微信扫一扫加我为好友

QQ号联系: 360901061

您的支持是博主写作最大的动力,如果您喜欢我的文章,感觉我的文章对您有帮助,请用微信扫描下面二维码支持博主2元、5元、10元、20元等您想捐的金额吧,狠狠点击下面给点支持吧,站长非常感激您!手机微信长按不能支付解决办法:请将微信支付二维码保存到相册,切换到微信,然后点击微信右上角扫一扫功能,选择支付二维码完成支付。

【本文对您有帮助就好】

您的支持是博主写作最大的动力,如果您喜欢我的文章,感觉我的文章对您有帮助,请用微信扫描上面二维码支持博主2元、5元、10元、自定义金额等您想捐的金额吧,站长会非常 感谢您的哦!!!

发表我的评论
最新评论 总共0条评论