rman 初級

http://www.cnenn.cn/html/jiuxingrengeceshi/

a ----》 恢復目錄所在的庫  (存儲別的庫的備份信息)

b ----》  需要備份的庫


首先在a庫創建好恢復目錄,和使用恢復目錄的用戶,及恢復目錄所在表空間

a庫需要的動作
 1. a庫首先為恢復目錄創建單獨的一個表空間
  create tablelspace rman_catalog datafile '/u01/product/oradata/a/rman_catalog.dbf' size 50M;
 2. 創建使用恢復目錄的用戶
  create user rman identified by rman default tablespace rman_catalog temporary tablespace temp;
 3.  為rman用戶授權
  grant connect ,resource ,recovery_catalog_owner to rman;
 4.  打開rman 
  rman
  connect catalog rman/rman
 5.   創建恢復目錄
  create catalog tablespace rman_catalog;
b庫需要的動作
 1.  b庫要使用恢復目錄  則首先得連接到a庫上註冊,使用a庫的rman用戶
  rman target internal/rman catalog rman/rman@a
  register database;---&gt註冊完成


rman的管理命令:

 1. list backup ----&gt列出所有的備份記錄
 2. report obsolete   ---&gt列出過時的備份信息
 3. crosscheck backup ---&gt 刪除過時的備份信息之前的動作
 4. delete expired backup; ----&gt刪除過時的備份信息
 歸檔方面:
 crosscheck archivelog all;
 crosscheck backupset;


全庫備份腳本:
 run{
 allocate channel c1 type disk;
 allocate channel c2 type disk;
 allocate channel c3 type disk;
 backup full tag  'dbfull' format '/backup/full%u_%s_%p' database
 include current controfile;
 sql 'alter system archive log current';
 backup fileaperset 3 format 'backup/arch%u_%s_%p'
 archivelog all delete input;
 release channel c1;
 release channel c2;
 release channel c3;
 }

零級備份
 run{
 allocate channel c1 type disk;
 allocate channel c2 type disk;
 allocate channel c3 type disk;
 backup incremental level 0 tag 'db0' format 'backup/db0%u_%s_%p'
 database skip readonly;
 sql 'alter system archive log current';
 backup fileaperset 3 format '/backup/arch%u_%s_%p'
 archivelog all delete input;
 release channle c1;
 release channel c2;
 release channel c3;
 }

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

转载于:http://blog.itpub.net/25072296/viewspace-697072/

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值