免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
123
最近访问板块 发新帖
楼主: chrestwang
打印 上一主题 下一主题

RMAN远程备份,备份文件存在运行RMAN的主机上吗? [复制链接]

论坛徽章:
1
数据库技术版块每日发帖之星
日期:2015-11-22 06:20:00
21 [报告]
发表于 2006-07-28 12:42 |只看该作者
顶一下。。。。。

论坛徽章:
1
数据库技术版块每日发帖之星
日期:2015-11-22 06:20:00
22 [报告]
发表于 2006-07-28 14:04 |只看该作者
还有一个问题是不是恢复数据时,不管是表还是数据库,最好是在mount状态下呢?


如果是在open下会报如下错误,不知道是什么原因/
RMAN> run{
2>  allocate channel c1 type disk;
3>  restore database;
4>  recover database;
5>  sql 'alter database open';
6>  release channel c1;
7>  }

allocated channel: c1
channel c1: sid=10 devtype=DISK

Starting restore at 28-JUL-06

skipping datafile 1; already restored to file /dev/rro9_system_2g
skipping datafile 2; already restored to file /dev/rro9_undotbs1_2g
skipping datafile 3; already restored to file /dev/rro9_drsys_1g
skipping datafile 4; already restored to file /dev/rro9_example
skipping datafile 5; already restored to file /dev/rro9_indx_1g
skipping datafile 6; already restored to file /dev/rro9_tools_1g
skipping datafile 7; already restored to file /dev/rro9_users_1g
skipping datafile 8; already restored to file /dev/rro9_odm_1g
skipping datafile 9; already restored to file /dev/rro_test
skipping datafile 10; already restored to file /dev/rro_test2
skipping datafile 11; already restored to file /dev/rro9_rman
restore not done; all files readonly, offline, or already restored
Finished restore at 28-JUL-06

Starting recover at 28-JUL-06

starting media recovery
media recovery failed
released channel: c1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 07/28/2006 01:58:00
ORA-00283: recovery session canceled due to errors
RMAN-11003: failure during parse/execution of SQL statement: alter database recover if needed
start
ORA-00283: recovery session canceled due to errors
ORA-01124: cannot recover data file 1 - file is in use or recovery
ORA-01110: data file 1: '/dev/rro9_system_2g'

论坛徽章:
0
23 [报告]
发表于 2006-07-28 15:12 |只看该作者
1﹑catalog 與 rcvcat是一樣的....
     
     Create catalog 是一定要的。當你是以 catalog 的方式來作恢復目錄的時候。

2﹑你的錯誤我沒見過﹐我猜你就是以 target system/pass@tns 的方式來連接目標資料庫﹐一般講來連目標庫要有 sysdba 的權限﹐應不會有分步連就會成功。分步連是否是以 sys連的..呵....

所以請將連接錯誤信息與步驟詳細貼出來...


3﹑set dbid 并不是在你這種情況下用的﹐當想改變 target database 時﹐還是老老實實的重新 connect target 。


4﹑你不能完成 恢復。你是否是在 open 的狀態下進行的。recover database 只能是 mount 下完成。
此外﹐
matelink 有記錄一個這樣的 bug:
查metalink,原来是bug来着.  Bug 2749174

RMAN backup on the standby fails with "ORA-19573: cannot obtain
sub-shared enqueue for datafile <n>" for a file added to the standby
by the recovery process. This occurs as the MRP process gets the
enqueue in X mode preventing RMAN from obtaining it.


Workaround:
  Stop and restart the MRP process

论坛徽章:
1
数据库技术版块每日发帖之星
日期:2015-11-22 06:20:00
24 [报告]
发表于 2006-07-28 17:15 |只看该作者
原帖由 zhang_yong88 于 2006-7-28 15:12 发表
1﹑catalog 與 rcvcat是一樣的....
     
     Create catalog 是一定要的。當你是以 catalog 的方式來作恢復目錄的時候。

2﹑你的錯誤我沒見過﹐我猜你就是以 target system/pass@tns 的方式來連接目標資料 ...





非常谢谢楼上兄弟的精彩回复,我后来是以sys连上的。刚开始是用system连的,还看其它文档基本上都是讲用system连的。我后来又尝试了一下,把system赋予sysdba权限。就可以登陆了。

oracle@server:/oracle>rman target system/system@testa catalog rman/rman@pay

Recovery Manager: Release 9.2.0.6.0 - 64bit Production

Copyright (c) 1995, 2002, Oracle Corporation.  All rights reserved.

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04005: error from target database:
ORA-01031: insufficient privileges
oracle@server:/oracle>rman target sys/system@testa catalog rman/rman@pay   

Recovery Manager: Release 9.2.0.6.0 - 64bit Production

Copyright (c) 1995, 2002, Oracle Corporation.  All rights reserved.

connected to target database: TESTA (DBID=49420984)
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04004: error from recovery catalog database: ORA-01033: ORACLE initialization or shutdown in progress
oracle@server:/oracle>rman target sys/system@testa

Recovery Manager: Release 9.2.0.6.0 - 64bit Production

Copyright (c) 1995, 2002, Oracle Corporation.  All rights reserved.

connected to target database: TESTA (DBID=49420984)

RMAN> connect catalog rman/rman@pay

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-04004: error from recovery catalog database: ORA-01033: ORACLE initialization or shutdown in progress

RMAN> connect catalog rman/rman@pay

connected to recovery catalog database

RMAN>



oracle@server:/oracle>rman target sys/system@testa catalog rman/rman@testb

Recovery Manager: Release 9.2.0.6.0 - 64bit Production

Copyright (c) 1995, 2002, Oracle Corporation.  All rights reserved.

connected to target database: TESTA (DBID=49420984)
connected to recovery catalog database

RMAN> exit


Recovery Manager complete.
oracle@server:/oracle>rman target sys/system@testb catalog rman/rman@testa

Recovery Manager: Release 9.2.0.6.0 - 64bit Production

Copyright (c) 1995, 2002, Oracle Corporation.  All rights reserved.

connected to target database: testb (DBID=173200208
connected to recovery catalog database

RMAN>

论坛徽章:
1
数据库技术版块每日发帖之星
日期:2015-11-22 06:20:00
25 [报告]
发表于 2006-07-30 18:22 |只看该作者
3﹑set dbid 并不是在你這種情況下用的﹐當想改變 target database 時﹐還是老老實實的重新 connect target 。

请问一下zhang_yong88 兄,这是在什么情况下使用呢?如果想设置的话,需要在哪种方式下运行呢?

还有我想取消掉一个目标数据库:
RMAN> execute dbms_rcvcat.unregisterdatabase(36,49420984);

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01005: syntax error: found "execute": expecting one of: "allocate, alter, backup, beginline, blockrecover, catalog, change, connect, copy, create, crosscheck, configure, duplicate, debug, delete, drop, exit, endinline, host, {, library, list, mount, open, print, quit, recover, register, release, replace, report, renormalize, reset, restore, resync, rman, run, rpctest, set, setlimit, sql, spool, startup, shutdown, send, show, test, upgrade, validate"
RMAN-01007: at line 1 column 1 file: standard input

是不是这个命令也不是在这种方式下执行呢?


RMAN> select * from db;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01005: syntax error: found "identifier": expecting one of: "allocate, alter, backup, beginline, blockrecover, catalog, change, connect, copy, create, crosscheck, configure, duplicate, debug, delete, drop, exit, endinline, host, {, library, list, mount, open, print, quit, recover, register, release, replace, report, renormalize, reset, restore, resync, rman, run, rpctest, set, setlimit, sql, spool, startup, shutdown, send, show, test, upgrade, validate"
RMAN-01008: the bad identifier was: select
RMAN-01007: at line 1 column 1 file: standard input


我对目标数据库进行全库并对其进行了恢复一切都正常;
但我以前里面注册了两个目标库,恢复完后我用reset database ,并同步catalog库,结果发现里面多了一个目标库,不知是什么原因;

RMAN> list incarnation of database;


List of Database Incarnations
DB Key  Inc Key DB Name  DB ID            CUR Reset SCN  Reset Time
------- ------- -------- ---------------- --- ---------- ----------
35      36      TESTA    49420984         NO  1          24-JUL-06
35      320     TESTA    49420984         YES 270815     30-JUL-06
1       2       testb      1732002088       YES 1          24-JUL-06

[ 本帖最后由 jeffreyli 于 2006-7-31 09:10 编辑 ]

论坛徽章:
0
26 [报告]
发表于 2006-10-25 21:10 |只看该作者
好贴

论坛徽章:
0
27 [报告]
发表于 2011-12-08 13:49 |只看该作者
要实现RMAN远程备份,必须通过第三方备份软件,来实现RMAN提供的API接口,实现远程读写,比较有名的如Veritas,TSM备份软件,但是都是要授权的,而且费用不低,如果你想个人使用学习,或者小企业使用,你可以到o-backup.com下载个obackup 备份软件来试用学习!

论坛徽章:
0
28 [报告]
发表于 2012-08-31 11:52 |只看该作者
很好,学习了!!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP