博客
关于我
oracle备份恢复之rman恢复到异机
阅读量:794 次
发布时间:2023-02-25

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

Recovery Manager: Release 10.2.0.1.0 - Production on Tue Dec 11 19:02:05 2012

Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: CRM (DBID=3601019238)
RMAN> list backup of spfile;
BS Key Type LV Size Device Type Elapsed Time Completion Time
13 Full 7.11M DISK 00:00:04 09-DEC-12
BP Key: 13 Status: AVAILABLE Compressed: NO Tag: TAG20121209T040058
Piece Name: /oracle/app/db1/dbs/0dnsd96i_1_1
SPFILE Included: Modification time: 09-DEC-12

RMAN> list backup of controlfile;

BS Key Type LV Size Device Type Elapsed Time Completion Time
13 Full 7.11M DISK 00:00:04 09-DEC-12
BP Key: 13 Status: AVAILABLE Compressed: NO Tag: TAG20121209T040058
Piece Name: /oracle/app/db1/dbs/0dnsd96i_1_1
Control File Included: Ckp SCN: 2779528241 Ckp time: 09-DEC-12

RMAN> list backup of database;

BS Key Type LV Size Device Type Elapsed Time Completion Time
12 Full 599.38M DISK 00:03:33 09-DEC-12
BP Key: 12 Status: AVAILABLE Compressed: NO Tag: TAG20121209T040058
Piece Name: /oracle/app/db1/dbs/0cnsd8vq_1_1
List of Datafiles in backup set 12
1 Full 2779528081 09-DEC-12 /oracle/test/system1.dbf
2 Full 2779528081 09-DEC-12 /oracle/test/zxb.dbf
3 Full 2779528081 09-DEC-12 /oracle/test/sysaux01.dbf
4 Full 2779528081 09-DEC-12 /oracle/test/users01.dbf
5 Full 2779528081 09-DEC-12 /oracle/test/zxa.dbf
6 Full 2779528081 09-DEC-12 /oracle/test/test1.dbf
7 Full 2779528081 09-DEC-12 /oracle/test/zxc.dbf
8 Full 2779528081 09-DEC-12 /oracle/test/undotbs1.dbf
9 Full 2779528081 09-DEC-12 /oracle/test/zxbig.dbf

RMAN> list backup of archivelog all;

RMAN> restore spfile to '/oracle/app/db1/dbs/spfileCRM.ora' from '/oracle/app/db1/dbs/0dnsd96i_1_1';
Starting restore at 10-DEC-12
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=34 devtype=DISK
channel ORA_DISK_1: autobackup found: /oracle/app/db1/dbs/0dnsd96i_1_1
channel ORA_DISK_1: SPFILE restore from autobackup complete
Finished restore at 10-DEC-12

RMAN> restore controlfile to '/oracle/CRM2/CRM/control01.ctl' from '/oracle/app/db1/dbs/0dnsd96i_1_1';

Starting restore at 10-DEC-12
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=210 devtype=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:04
Finished restore at 10-DEC-12
cp /oracle/CRM2/CRM/control01.ctl /oracle/CRM2/CRM/control02.ctl

RMAN> alter database mount;

database mounted
released channel: ORA_DISK_1

RMAN> catalog start with '/backup/';

searching for all files that match the pattern /backup/
List of Files Unknown to the Database
File Name: /backup/0ensd96n_1_1
File Name: /backup/0bnsd8vn_1_1
File Name: /backup/0cnsd8vq_1_1

Do you really want to catalog the above files (enter YES or NO)? yes

cataloging files...
cataloging done

List of Cataloged Files

File Name: /backup/0ensd96n_1_1
File Name: /backup/0bnsd8vn_1_1
File Name: /backup/0cnsd8vq_1_1

RMAN> restore database;

Starting restore at 10-DEC-12
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=209 devtype=DISK
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /oracle/test/system1.dbf
restoring datafile 00002 to /oracle/test/zxb.dbf
restoring datafile 00003 to /oracle/test/sysaux01.dbf
restoring datafile 00004 to /oracle/test/users01.dbf
restoring datafile 00005 to /oracle/test/zxa.dbf
restoring datafile 00006 to /oracle/test/test1.dbf
restoring datafile 00007 to /oracle/test/zxc.dbf
restoring datafile 00008 to /oracle/test/undotbs1.dbf
restoring datafile 00009 to /oracle/test/zxbig.dbf
channel ORA_DISK_1: reading from backup piece /oracle/app/db1/dbs/0cnsd8vq_1_1
channel ORA_DISK_1: restored backup piece 1
piece handle=/oracle/app/db1/dbs/0cnsd8vq_1_1 tag=TAG20121209T040058
channel ORA_DISK_1: restore complete, elapsed time: 00:02:56
Finished restore at 10-DEC-12

RMAN> recover database;

Starting recover at 10-DEC-12
using channel ORA_DISK_1
archive log thread 1 sequence 16 is already on disk as file /oracle/CRM2/CRM/redo04b.log
archive log thread 1 sequence 17 is already on disk as file /oracle/CRM2/CRM/redo05.log
archive log filename=/oracle/CRM2/CRM/redo04b.log thread=1 sequence=16
archive log filename=/oracle/CRM2/CRM/redo05.log thread=1 sequence=17
media recovery complete, elapsed time: 00:00:05
Finished recover at 10-DEC-12

RMAN> alter database open resetlogs;

Database altered.

转载地址:http://pmpfk.baihongyu.com/

你可能感兴趣的文章
Oracle E-Business Suite软件 任意文件上传漏洞(CVE-2022-21587)
查看>>
Oracle EBS OPM 发放生产批
查看>>
Oracle EBS-SQL (BOM-15):检查多层BOM(含common BOM).sql
查看>>
Oracle EBS环境下查找数据源(OAF篇)
查看>>
oracle Extract 函数
查看>>
uni-app开发环境自动部署的一个误区(App running at...)
查看>>
Oracle GoldenGate Director安装和配置(无图)
查看>>
oracle instr函数详解
查看>>
Oracle Java所有版本的下载链接
查看>>
Oracle JDBC url的几种方式
查看>>
oracle ogg 单实例双向复制搭建(oracle-oracle)--Oracle GoldenGate
查看>>
oracle ORA-14402 OGG-01296
查看>>
oracle partition by list,深入解析partition-list 分区
查看>>
Oracle PL/SQL Dev工具(破解版)被植入勒索病毒的安全预警及自查通告
查看>>
oracle rac集群的东西之QQ聊天
查看>>
Oracle Schema Objects——Tables——Table Compression
查看>>
oracle scott趣事
查看>>
oracle script
查看>>
Oracle select表要带双引号的原因
查看>>
Oracle SOA Suit Adapter
查看>>