Rman异机还原database

1. 创建用户名,组
2. 创建相同的目录
Datafile redo log arch bdump cdump create udump
配置tnsnames.ora listener.ora
拷贝pfile 修改,创建spfile
3.
SQL> startup nomount;
ORACLE instance started.

Total System Global Area 504856256 bytes
Fixed Size 741056 bytes
Variable Size 167772160 bytes
Database Buffers 335544320 bytes
Redo Buffers 798720 bytes

-bash-3.00$ rman target / catalog system/system@inst1002
RMAN> set dbid=3157572766

executing command: SET DBID
RMAN> run {
2> allocate channel t1 type 'sbt_tape';
3> send 'nb_ora_serv=szcnbu1,nb_ora_client=ssuzmesvs01';
4> restore controlfile;
5> }

allocated channel: t1
channel t1: sid=8 devtype=SBT_TAPE
channel t1: VERITAS NetBackup for Oracle - Release 5.1 (2006040520)
sent command to channel: t1
Starting restore at 23-JUL-07
channel t1: starting datafile backupset restore
channel t1: restoring controlfile
output filename=/oracle/304/oradata/inst933/control01.ctl
channel t1: restored backup piece 1
piece handle=sp_827_1_628690182 tag=ORACLE_SPFILE params=NULL
channel t1: restore complete
replicating controlfile
input filename=/oracle/304/oradata/inst933/control01.ctl
output filename=/oracle/304/oradata/inst933/control02.ctl
Finished restore at 23-JUL-07
released channel: t1

重建密码文件orapwd file=/oracle/app/oracle/product/9.2.0/dbs/orapwinst933.ora password=system entries=10

RMAN> run {
2> ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
3> send 'nb_ora_serv=szcnbu1,nb_ora_client=ssuzmesvs01';
4> set until time "to_date('07/02/07 13:30:00','MM/DD/YY HH24:MI:SS')";
5> restore database;
--restore archivelog sequence between 507 and 509 thread 1;
--restore archivelog from logseq 1 until logseq 10;
6> recover database;
7> sql 'alter database open resetlogs';
8> RELEASE CHANNEL ch00;
9> }

allocated channel: ch00
channel ch00: sid=11 devtype=SBT_TAPE
channel ch00: VERITAS NetBackup for Oracle - Release 5.1 (2006040520)
sent command to channel: ch00
executing command: SET until clause
Starting restore at 24-JUL-07
channel ch00: starting datafile backupset restore
channel ch00: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /oracle/304/oradata/inst933/system01.dbf
restoring datafile 00002 to /oracle/304/oradata/inst933/undotbs01.dbf
restoring datafile 00003 to /oracle/304/oradata/inst933/users01.dbf
channel ch00: restored backup piece 1
piece handle=bk_493_1_626102578 tag=FULL_ORACLE_BACKUP params=NULL
channel ch00: restore complete
channel ch00: starting datafile backupset restore
channel ch00: specifying datafile(s) to restore from backup set
restoring datafile 00005 to /oracle/304/oradata/inst933/insite_suz.dbf
channel ch00: restored backup piece 1
piece handle=bk_506_1_626184566 tag=INCREMENTAL_ORACLE_BACKUP params=NULL
channel ch00: restore complete
Finished restore at 24-JUL-07

Starting recover at 24-JUL-07
channel ch00: starting incremental datafile backupset restore
channel ch00: specifying datafile(s) to restore from backup set
destination for restore of datafile 00001: /oracle/304/oradata/inst933/system01.dbf
destination for restore of datafile 00002: /oracle/304/oradata/inst933/undotbs01.dbf
destination for restore of datafile 00003: /oracle/304/oradata/inst933/users01.dbf
destination for restore of datafile 00005: /oracle/304/oradata/inst933/insite_suz.dbf
channel ch00: restored backup piece 1
piece handle=bk_519_1_626270412 tag=INCREMENTAL_ORACLE_BACKUP params=NULL
channel ch00: restore complete
starting media recovery
archive log filename=/oracle/304/arch/inst933/arch_1_439.arc thread=1 sequence=439
media recovery complete
Finished recover at 24-JUL-07
sql statement: alter database open resetlogs
released channel: ch00

$ sqlplus "/as sysdba"
SQL*Plus: Release 9.2.0.8.0 - Production on Tue Jul 24 10:00:35 2007
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production
SQL> select open_mode from v$database;
OPEN_MODE
----------
READ WRITE

[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10897379/viewspace-964313/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/10897379/viewspace-964313/

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值