printing stored script. Memory Script
{
switch clone datafile all;
}
executing script. Memory Script
datafile 2 switched to datafile copy
input datafilecopy recid=78 stamp=639940495 filename=/data/rma/undotbs01.dbf
datafile 3 switched to datafile copy
input datafilecopy recid=79 stamp=639940495 filename=/u01/product/oradata/rma/cwmlite01.dbf
datafile 4 switched to datafile copy
input datafilecopy recid=80 stamp=639940495 filename=/u01/product/oradata/rma/drsys01.dbf
datafile 5 switched to datafile copy
input datafilecopy recid=81 stamp=639940495 filename=/u01/product/oradata/rma/indx01.dbf
datafile 6 switched to datafile copy
input datafilecopy recid=82 stamp=639940495 filename=/u01/product/oradata/rma/tools01.dbf
.........................
printing stored script. Memory Script
{
set until scn 3720891985;
recover
standby
clone database
delete archivelog
; }
executing script. Memory Script
executing command: SET until clause
Starting recover at 29-NOV-07
using channel ORA_AUX_DISK_1
starting media recovery
archive log thread 1 sequence 5 is already on disk as file /data/rma/arch/1_5.arc
archive log thread 1 sequence 6 is already on disk as file /data/rma/arch/1_6.arc
archive log filename=/data/rma/arch/1_5.arc thread=1 sequence=5
archive log filename=/data/rma/arch/1_6.arc thread=1 sequence=6
media recovery complete
Finished recover at 29-NOV-07
Finished Duplicate Db at 29-NOV-07
RMAN> exit
Recovery Manager complete.
RMAN命令执行完之后数据库已处于Mount状态,可以重新拷贝归档日志文件进行Recover。
下面命令在Standby Server上操作
fbrmadbbak$cd
fbrmadbbak$cd /data/run
fbrmadbbak$sh autoftprma
fbrmadbbak$sqlplus "/ as sysdba"
SQL> recover standby database
Specify log: {=suggested | filename | AUTO | CANCEL}
auto
SQL> exit
确认OK后,设置crontab以自动化拷贝归档日志文件和应用归档处理即可。
fb-dbbak$crontab -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.4587 installed on Thu Nov 29 16:19:18 2007)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
0 * * * * sh /u01/run/autoftprma 1>/u01/run/autoftprma.log 2>/u01/run/autoftprma.bad
[root@fb-dbbak root]# crontab -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.5166 installed on Thu Nov 29 17:31:50 2007)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
0,30 * * * * sh /u01/run/ntp.txt 1>>/u01/run/ntp.log 2>>/u01/run/ntp.bad
* * * * * sh /u01/run/loadavg 1>>/u01/run/loadavg.log 2>>/u01/run/loadavg.bad
30 * * * * sh /u01/run/autoreco 1>>/u01/run/autoreco.log 2>>/u01/run/autoreco.bad
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/12137615/viewspace-539838/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/12137615/viewspace-539838/