Oracle还原恢复启动时数据库报ORA-00704、 ORA-00604,、ORA-00904的问题解决
oracle数据库还原恢复后,执行alter database open resetlogs时遇到下面错误。如下所示:
SQL>alterdatabaseopenresetlogs; alterdatabaseopenresetlogs * ERRORatline1: ORA-00603:ORACLEserversessionterminatedbyfatalerror ORA-01092:ORACLEinstanceterminated.Disconnectionforced ORA-00704:bootstrapprocessfailure ORA-开发者_Mysql00604:erroroccurredatrecursiveSQLlevel1 ORA-00904:"I"."UNUSABLEBEGINNING#":javascriptinvalididentifier ProcessID:19288 SessionID:2Serialnumber:4441
刚开始有点懵的,第一次遇到这种情形。不过搜索了一下metalink相关资料后,大致了解到是因为环境变量设置有误导致这些错误出现的。这里先介绍一下这个案例的复杂背景:
当前机器为一个测试服务器(UAT环境),操作系统版本为HP-UX,数据库版本Oracle 19c,然后因为Support人员要查找历史数据,需要还原一个2020年时间点的数据库备份。但是生产环境(PROD)在2020年是Oracle 11g,然后在2021年升级为了Oracle 19c,现在测试服务器(UAT环境)的数据库版本也是Oracle 19c,于是从其它测试服务器拷贝了一个Oracle 11g版本的挂载带点/opt/oracle11g到当前测试服务器(为了方便省事,如果重新安装搭建Oracle 11g环境还麻烦一些),然后设置了一下/etc/oratab,如下所示:(xxx表示ORACLE_SID)
#xxx:/opt/oracle19c/product/19.3.0/db_1:N xxx:/opt/oracle11g/product/11.2:N
退出当前SecureCRT窗口,重新登陆,提示修改成功,如下所示
ORACLE_SID=[xxx]?xxx OracleS编程客栈ID=xxx OracleBASE=/opt/oracle11g OracleHOME=/opt/oracle11g/product/11.2 SQL*NetTNS=/etc ORA_NLS10=/opt/oracle11g/product/11.2/nls/data
由于忙着检查/修改pfile文件中的参数,当时没有仔细检查环境变量,匆匆忙忙就开始了数据库实例的还原恢复,但是当前的和ORACLE_HOME环境变量确实还是Oracle 19c的环境变量
>echo$ORACLE_BASE /opt/oracle19c >echo$ORACLE_HOME /opt/oracle19c/product/19.3.0/db_1
修改环境变量~/.profile后,执行. ~/.profile设置生效。然后重新登陆SecureCRT后,重新还原数据库就不会遇到这个问题。另外,如果不重新还原,关闭数据库后,重新OPEN数据库亦可以,测试没有什么问题。
官方文档Database Startup Failure After RMAN Restore with ORA-00704, ORA-00604, ORA-00904 (Doc ID 2540757.1)的具体内容如下:
APPLIESTO: OracleDatabase-EnterpriseEdition-Version11.2.0.4andlater Informationinthisdocumentappliestoanyplatform. SYMPTOMS SQL>alterdatabaseopen; alterdatabaseopen * ERRORatline1: ORA-01092:ORACLEinstanceterminated.Disconnectionforced ORA-00704:bootstrapprocessfailure ORA-00604:erroroccurredatrecursiveSQLlevel2 ORA-00904:"I"."UNUSABLEBEGINNING#":invalididentifier ProcessID:23346 SessionID:680Serialnumber:51933 CHANGES AfterrestoringthedatabasetoanotherserverbyRMAN,itisfailedtostartup. Afterupgradeorpostupjsgrade CAUSE >>>>>ORA-00904:"I"."UNUSABLEBEGINNING#":invalididentifier Thiserrorappearsduetousingtheincorrectsqlplusenvironment.Forexample.,BydefaultSQLPLUSwillconnecttothedefaultORACLE_HOME,say12CHomebutifyouareduplicatingthe11gdatabaseonsamehosttheitmustbeOracle11gEnvironmentinordertocompletetheprocess. 1-Thisissuewww.devze.comhappenswhenwehaveinstalledmultipleOracleHomesinasinglesystem. 2-Weneedtomakesurethatweareintherightenvironmentwhenwearerestoringit. SOLUTION YouneedtosetalltherequiredEnvironmentVariablesfirstASPeryourneedlikeORACLE_SID,ORACLE_BASE,ORACLE_HOME,TNS_ADMIN,PATHwithpropervalues (OR) SimplyworkbygoingtothebindirectoryofyourrequiredORACLE_HOME SETORACLE_HOME=Your_Oracle_Home CDORACLE_HOME\bin Evenifyousetalltheenvironmentparameterproperly,thenneedtoinvestigatefurthertoverifythermanbackupsetwhichusedtorestoreorverifytheupgradelogs,component,dba_registryetc. ProvidethedetailsrequestedinbelowNotesbasedonthepostrestoreorpostupgrade Note1905616.1SRDC-StartupIssues:ChecklistofEvidencetoSupply(DocID1905616.1) Note1906468.1SRDC-StartupShutdown-OracleBinaryanDOSResources:ChecklistofEvidencjsetoSupply(DocID1906468.1) Note:1672387.1SRDC-DataCollectionforUpgradeIssues Note753041.1HowtoDiagnoseComponentswithNONVALIDStatusinDBA_REGISTRYafteranUpgrade(DocID753041.1) Note1965956.1SRDC-DataCollectionforDatapatchissues(DocID1965956.1) Note1671416.1SRDC-RequireddiagnosticdatacollectionforRMANRestoreandRecoverUsingTFACollector(Recommended)orManualSteps(DocID1671416.1)
到此这篇关于ORACLE还原恢复启动时数据库报ORA-00704、 ORA-00604,、ORA-00904的问题解决的文章就介绍到这了,更多相关oracle还原恢复启动报错内容请搜索我们以前的文章或继续浏览下面的相关文章希望大家以后多多支持我们!
精彩评论