你好,游客 登录 注册 搜索
背景:
阅读新闻

探索Oracle之RMAN_04非一致性备份

[日期:2012-05-26] 来源:Linux社区  作者:吴伟龙 [字体:大 中 小]

重启数据库到mount状态  ---很重要

SQL> startup mount;

Oracle instancestarted.

Total SystemGlobal Area  285212672 bytes

Fixed Size                  1218968 bytes

VariableSize              79693416 bytes

DatabaseBuffers          197132288 bytes

RedoBuffers                7168000 bytes

Databasemounted.

 

SQL> exit

Disconnectedfrom Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With thePartitioning, OLAP and Data Mining options

 

[oracle@wwldb dbs]$ rman target /

RecoveryManager: Release 10.2.0.1.0 - Production on Wed May 23 19:04:15 2012

Copyright (c)1982, 2005, Oracle.  All rights reserved.

connected totarget database: WWL (DBID=5520179, not open)

 

注意:详细参考如下:

http://blog.csdn.net/wuweilong/article/details/7596056

http://space.itpub.net/?uid-20674423-action-viewspace-itemid-730717

 

6、恢复数据库其它的数据文件:

RMAN> restore database;

Starting restoreat 23-MAY-12

using targetdatabase control file instead of recovery catalog

allocatedchannel: ORA_DISK_1

channelORA_DISK_1: sid=156 devtype=DISK

 

channelORA_DISK_1: starting datafile backupset restore

channelORA_DISK_1: specifying datafile(s) to restore from backup set

restoringdatafile 00004 to /DBData/WWL/users01.dbf

channelORA_DISK_1: reading from backup piece /DBBak/bak_WWL_05_23_0cnbn2a3_1_1

channelORA_DISK_1: restored backup piece 1

piece handle=/DBBak/bak_WWL_05_23_0cnbn2a3_1_1tag=TAG20120523T133147

channelORA_DISK_1: restore complete, elapsed time: 00:00:02

channelORA_DISK_1: starting datafile backupset restore

channelORA_DISK_1: specifying datafile(s) to restore from backup set

restoringdatafile 00001 to /DBData/WWL/system01.dbf

restoringdatafile 00002 to /DBData/WWL/undotbs01.dbf

restoringdatafile 00003 to /DBData/WWL/sysaux01.dbf

channelORA_DISK_1: reading from backup piece /DBBak/bak_WWL_05_23_0enbn2bk_1_1

channelORA_DISK_1: restored backup piece 1

piecehandle=/DBBak/bak_WWL_05_23_0enbn2bk_1_1 tag=TAG20120523T133235

channelORA_DISK_1: restore complete, elapsed time: 00:01:05

Finished restoreat 23-MAY-12

 

RMAN>

RMAN> recover database;

Starting recoverat 23-MAY-12

using channel ORA_DISK_1

starting mediarecovery

media recovery complete,elapsed time: 00:00:05

Finished recoverat 23-MAY-12

 

RMAN> alter database open;  ---------我们看到数据库已经打开了处于open状态

database opened

 

SQL> select instance_name,status from v$instance;

INSTANCE_NAME    STATUS

----------------------------

WWL             OPEN

 

SQL>

 

注意:

restore:是将物理的数据文件从备份集中恢复出到原来的位置

recover:是利用redo日志,将备份点后的数据库通过redo日志重做

linux
相关资讯       Oracle高级培训 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款