Chinaunix首页 | 论坛 | 博客
  • 博客访问: 11623614
  • 博文数量: 8065
  • 博客积分: 10002
  • 博客等级: 中将
  • 技术积分: 96708
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-16 17:06
文章分类

全部博文(8065)

文章存档

2008年(8065)

分类: 服务器与存储

2008-06-03 15:50:16

connect 'internal/manager@scdb1';
           sql 'alter system archive log current';
          backup
            format 'arch_t%t_s%s_p%p'
            (archivelog
            like '/jfbackup/arch_log/arch_1_%.arc'
            delete input);
        release channel d1;
        }
       
run {
           allocate channel d2 type 'sbt_tape' parms
ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)'
    connect 'internal/manager@scdb2';
           sql 'alter system archive log current';
          backup
            format 'arch_t%t_s%s_p%p'
            (archivelog
            like '/jfbackup/arch_log/arch_2_%.arc'
            delete input);
        release channel d2;
        }
        同时还可以对指定的tablespace datafile进行备份,具体请参见RMAN相关手册。
        手工执行ORACLE的备份:
        rman target internal/oracle@targetSID rcvcat rman/rman@recoverycatalogSID cmdfile=/xxx/xxx msglog=xxx.log
八、        ORACLE数据库的恢复
run {
        allocate channel d3 type 'sbt_tape' connect 'internal/manager@scdb1' parms
'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
        allocate channel d4 type 'sbt_tape' connect 'internal/manager@scdb2' parms
'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
        restore controlfile;
        alter database mount;
        restore database;
        recover database;
        release channel d1;
        release channel d2;
        sql "alter database open resetlogs";
        }
阅读(878) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~