博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
用RMAN创建Physical Standby Database(六)
阅读量:2452 次
发布时间:2019-05-10

本文共 2637 字,大约阅读时间需要 8 分钟。

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/

你可能感兴趣的文章
火狐插件 xpi打包_将Firefox扩展程序打包为XPI
查看>>
使用Google Analytics(分析)跟踪AJAX链接点击
查看>>
图像处理库 gd_使用PHP和GD库进行图像处理
查看>>
robots.txt_robots.txt在开发服务器上重新路由
查看>>
css压缩_使用PHP轻松实现CSS压缩
查看>>
印象chrome_Google Chrome的第一印象
查看>>
mootools_使用MooTools进行背景动画
查看>>
mootools_使用MooTools 1.2分配锚点ID
查看>>
使用MySQL DATE_FORMAT()格式化日期字段
查看>>
mootools_使用MooTools的Digg样式动态共享小部件
查看>>
php验证码数字_PHP:验证数值和数字
查看>>
做了磁盘阵列的硬盘如何恢复_从自制软件恢复磁盘空间
查看>>
post 重复参数_参数名称重复
查看>>
保存到VS Code后如何修复ESLint错误
查看>>
Object.fromEntries
查看>>
mongdb选择存储引擎:_选择引擎:从右到左
查看>>
pubg 接口在哪里_如何在PUBG中获取绿血
查看>>
node压缩css_Node.js CSS压缩器:clean-css
查看>>
JavaScript CSS助手
查看>>
邪恶的AJAX:使用jQuery的Spyjax
查看>>