探索ORACLE之RMAN_03非一致性备份(七)

2014-11-24 08:48:39 · 作者: · 浏览: 4
/dbs/cntrlWWL.dbf
Finished restoreat 23-MAY-12
RMAN>
重启数据库到mount状态 ---很重要
SQL> startup mount;
ORACLE instancestarted.
Total SystemGlobal Area 285212672 bytes
Fixed Size 1218968 bytes
VariableSize 79693416 bytes
DatabaseBuffers 197132288 bytes
RedoBuffers 7168000 bytes
Databasemounted.
SQL> exit
Disconnectedfrom Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With thePartitioning, OLAP and Data Mining options
[oracle@wwldb dbs]$ rman target /
RecoveryManager: Release 10.2.0.1.0 - Production on Wed May 23 19:04:15 2012
Copyright (c)1982, 2005, Oracle. All rights reserved.
connected totarget database: WWL (DBID=5520179, not open)
注意:详细参考如下:
http://www.2cto.com/database/201205/133121. html

6、恢复数据库其它的数据文件:
RMAN> restore database;
Starting restoreat 23-MAY-12
using targetdatabase control file instead of recovery catalog
allocatedchannel: ORA_DISK_1 www.2cto.com
channelORA_DISK_1: sid=156 devtype=DISK
channelORA_DISK_1: starting datafile backupset restore
channelORA_DISK_1: specifying datafile(s) to restore from backup set
restoringdatafile 00004 to /DBData/WWL/users01.dbf
channelORA_DISK_1: reading from backup piece /DBBak/bak_WWL_05_23_0cnbn2a3_1_1
channelORA_DISK_1: restored backup piece 1
piece handle=/DBBak/bak_WWL_05_23_0cnbn2a3_1_1tag=TAG20120523T133147
channelORA_DISK_1: restore complete, elapsed time: 00:00:02
channelORA_DISK_1: starting datafile backupset restore
channelORA_DISK_1: specifying datafile(s) to restore from backup set
restoringdatafile 00001 to /DBData/WWL/system01.dbf
restoringdatafile 00002 to /DBData/WWL/undotbs01.dbf
restoringdatafile 00003 to /DBData/WWL/sysaux01.dbf
channelORA_DISK_1: reading from backup piece /DBBak/bak_WWL_05_23_0enbn2bk_1_1
channelORA_DISK_1: restored backup piece 1
piecehandle=/DBBak/bak_WWL_05_23_0enbn2bk_1_1 tag=TAG20120523T133235
channelORA_DISK_1: restore complete, elapsed time: 00:01:05
Finished restoreat 23-MAY-12
RMAN>
RMAN> recover database;
Starting recoverat 23-MAY-12
using channel ORA_DISK_1
starting mediarecovery
media recovery complete,elapsed time: 00:00:05
Finished recoverat 23-MAY-12
www.2cto.com
RMAN> alter database open; ---------我们看到数据库已经打开了处于open状态
database opened
SQL> select instance_name,status from v$instance;
INSTANCE_NAME STATUS
----------------------------
WWL OPEN
SQL>
注意:
restore:是将物理的数据文件从备份集中恢复出到原来的位置
recover:是利用redo日志,将备份点后的数据库通过redo日志重做.
作者 吴伟龙