用RMAN创建Physical Standby Database(六)

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/

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值