Starting backupat 05-JUL-12
using channelORA_DISK_1
channelORA_DISK_1: starting full datafile backupset
channelORA_DISK_1: specifying datafile(s) in backupset
including currentSPFILE in backupset
channelORA_DISK_1: starting piece 1 at 05-JUL-12
channelORA_DISK_1: finished piece 1 at 05-JUL-12
piecehandle=/DBBak/bak_WWL_07_05_03nfbi5c_1_1 tag=TAG20120705T175348 comment=NONE
channelORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backupat 05-JUL-12
Starting ControlFile and SPFILE Autobackup at 05-JUL-12
piecehandle=/DBSoft/product/10.2.0/db_1/dbs/c-5520179-20120705-01 comment=NONE
Finished ControlFile and SPFILE Autobackup at 05-JUL-12
RMAN>
2、备份完之后,我们可以看到如下备份信息:
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- ------------ ----------- ------------ ---------------
3 Full80.00K DISK 00:00:01 05-JUL-12
BP Key: 3 Status: AVAILABLE Compressed: NO Tag: TAG20120705T175348
Piece Name:/DBBak/bak_WWL_07_05_03nfbi5c_1_1
SPFILE Included: Modification time: 05-JUL-12
3、模拟参数文件丢失:
SQL> showparameter spfile;
NAME TYPE VALUE
----------------------------------------------- ------------------------------
spfile string /DBSoft/product/10.2.0/db_1/db
s/spfileWWL.ora
SQL>
删除参数文件:
[oracle@wwldb ~]$ rm/DBSoft/product/10.2.0/db_1/dbs/spfileWWL.ora
[oracle@wwldb ~]$ ls /DBSoft/product/10.2.0/db_1/dbs/spfileWWL.ora
ls: /DBSoft/product/10.2.0/db_1/dbs/spfileWWL.ora: No such file ordirectory
4、重启数据库
SQL> startup
ORA-01078:failure in processing system parameters
LRM-00109: couldnot open parameter file '/DBSoft/product/10.2.0/db_1/dbs/initWWL.ora'
Starting restore at 05-JUL-12
using target database control file insteadof recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=36 devtype=DISK
RMAN-00571:===========================================================
RMAN-00569: =============== ERROR MESSAGESTACK FOLLOWS ===============
RMAN-00571:===========================================================
RMAN-03002: failure of restore command at07/05/2012 18:44:06
RMAN-06563: control file or SPFILE must berestored using FROM AUTOBACKUP
恢复的时候报错,说控制文件和spfile文件的恢复必须是来自于自动备份,但是我们没有做自动备份呀,怎么办,我们刚才是手工备份的参数文件。那么我们将用如下的指定备份路径来进行参数文件的恢复。
RMAN> restore spfile from'/DBBak/bak_WWL_07_05_03nfbi5c_1_1';
Starting restore at 05-JUL-12
using channel ORA_DISK_1