本实验是恢复spfile:SQLgt;shutdownimmediate;Databaseclosed.Databasedismounted.Oracleinstanceshutdown.SQLgt;sta
本实验是恢复spfile:
SQL>shutdownimmediate;Databaseclosed.Databasedismounted.Oracleinstanceshutdown.SQL>startupnomount;ORACLEinstancestarted.
TotalSystemGlobalArea335544320bytesFixedSize1219280bytesVariableSize79693104bytesDatabaseBuffers251658240bytesRedoBuffers2973696bytesSQL>![oracle@aoracle~]$rmantarget/
RecoveryManager:Release10.2.0.1.0-ProductiononThuDec816:43:312011
connectedtotargetdatabase:ezhou(notmounted)
RMAN>restorespfile;
Startingrestoreat08-DEC-11usingtargetdatabasecontrolfileinsteadofrecoverycatalogallocatedchannel:ORA_DISK_1channelORA_DISK_1:sid=155devtype=DISK
RMAN-00571:===========================================================RMAN-00569:===============ERRORMESSAGESTACKFOLLOWS===============RMAN-00571:===========================================================RMAN-03002:failureofrestorecommandat12/08/201116:43:41RMAN-06563:controlfileorSPFILEmustberestoredusingFROMAUTOBACKUP
看一下spfile文件:已经被移走:[oracle@aoracledbs]$ls-lspfile*-rw-r-----1oracleoinstall2560Oct1015:20spfileezhoudg.ora-rw-r-----1oracleoinstall2560Dec815:16spfileezhou.ora_b
[oracle@aoracledbs]$tnspingprd
TNSPingUtilityforLinux:Version10.2.0.1.0-Productionon08-DEC-201117:17:27
Usedparameterfiles:
UsedTNSNAMESadaptertoresolvethealiasAttemptingtocontact(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.190.140)(PORT=1521)))(CONNECT_DATA=(SID=EZHOU)))OK(10msec)[oracle@aoracledbs]$tnspingprdd
TNSPingUtilityforLinux:Version10.2.0.1.0-Productionon08-DEC-201117:17:34
[oracle@aoracledbs]$rmantargetrman_user/rman_user
RecoveryManager:Release10.2.0.1.0-ProductiononThuDec817:19:022011
connectedtotargetdatabase:EZHOU(DBID=4046377924,notopen)
channelORA_DISK_1:startingdatafilebackupsetrestorechannelORA_DISK_1:restoringSPFILEoutputfilename=/u01/pp/oracle/product/10.2/db_1/dbs/spfileezhou.orachannelORA_DISK_1:readingfrombackuppiece/u02/rman/ctl_c-4046377924-20111208-00channelORA_DISK_1:restoredbackuppiece1piecehandle=/u02/rman/ctl_c-4046377924-20111208-00tag=TAG20111208T134435channelORA_DISK_1:restorecomplete,elapsedtime:00:00:02Finishedrestoreat08-DEC-11
RMAN>
检查spfile已经恢复。
[oracle@aoracledbs]$ls-lspfile*-rw-r-----1oracleoinstall2560Oct1015:20spfileezhoudg.ora-rw-r-----1oracleoinstall2560Dec817:19spfileezhou.ora-rw-r-----1oracleoinstall2560Dec815:16spfileezhou.ora_b[oracle@aoracledbs]$dateThuDec817:29:22CST2011