ITPub博客

首页 > Linux操作系统 > Linux操作系统 > RMAN tips

RMAN tips

原创 Linux操作系统 作者:mambo_shen 时间:2009-07-27 10:42:28 0 删除 编辑

RMAN>LIST COPY OF TABLESPACE 'SYSTEM';
RMAN>LIST BACKUP OF TABLESPACE 'SYSTEM' ;
RMAN>DELETE OBSOLETE ;
RMAN>DELETE EXPIRED BACKUP;
RMAN>DELETE EXPIRED COPY ;
RMAN>DELETE BACKUPSET 19 ;
RMAN>DELETE BACKUP ;
RMAN>DELETE COPY;
RMAN>BACKUP CURRENT CONTROLFILE;
RMAN>BACKUP DATABASE INCLUDE CURRENT CONTROLFILE;
RMAN>CONFIGURE RETENTION POLICY CLEAR ;
RMAN>BACKUP COPIES 3 DATABASE;

$RMANTARGET / @BACKUP_CFGDB.RMAN
RMAN>@BACKUP_CFGDB.RMAN
RMAN>RUN { @BACKUP_DB.RMAN }
RMAN>RUN { EXECUTE SCRIPT. BACKUP_WHOLE_DB };

RMAN> RUN{
      SET BACKUP COPIES 2;
      BACKUP DEVICE TYPE DISK FORMAT '/MOUNT1/%U','/MOUNT2/%U' 
      TABLESPACE USERS,SALES;
      }

RMAN>SHUTDOWN IMMEDIATE;
RMAN>STARTUP MOUNT; 
RMAN>RESTORE DATABASE;
RMAN>RECOVER DATABASE DELETE ARCHIVELOGS SKIP TABLESPACE TEMP;
RMAN>ALTER DATABASE OPEN;

RMAN>SHUTDOWN IMMEDIATE;
RMAN>STARTUP MOUNT;
RMAN>SQL 'ALTER TABLESPACE USER OFFLINE IMMEDIATE';
RMAN>RESTORE TABLESPACE USER;
RMAN>RECOVER TABLESPACE USER;
RMAN>SQL 'ALTER TABLESPACE USER ONLINE';
RMAN>ALTER DATABASE OPEN;

RMAN>SHUTDOWN IMMEDIATE;
RMAN>STARTUP MOUNT;
RMAN>SQL 'ALTER DATABASE DATAFILE 10 OFFLINE';
RMAN>RESTORE DATAFILE 10;
RMAN>RECOVER DATAFILE 10;
RMAN>SQL 'ALTER DATABASE DATAFILE 10 ONLINE';
RMAN>ALTER DATABASE OPEN;

SELECT * FROM V$ARCHIVED_LOG;
SELECT * FROM V$BACKUP_CORRUPTION;
SELECT * FROM V$COPY_CORRUPTION;
SELECT * FROM V$BACKUP_DATAFILE;
SELECT * FROM V$BACKUP_REDOLOG;
SELECT * FROM V$BACKUP_SET;
SELECT * FROM V$BACKUP_PIECE;

The difference between level0 and full :

A level 0 incremental backup is physically identical to a full backup. The only difference is that the level 0 backup is recorded as

an incremental backup in the RMAN repository, so it can be used as the parent for a level 1 backup.

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

上一篇: rlwrap
下一篇: RMAN recover
请登录后发表评论 登录
全部评论

注册时间:2008-10-09

  • 博文量
    86
  • 访问量
    73778