揭秘ORACLE備份之----RMAN之五(CATALOG)
[root@rhel5 ~]# su - oracle
[oracle@rhel5 ~]$ rman catalog
Recovery Manager: Release 10.2.0.5.0 - Production on Thu Sep 5 04:20:38 2013
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to recovery catalog database
RMAN> create catalog;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-06426: RECOVERY_CATALOG_OWNER role must be granted to user SCOTT
RMAN> -- catalog管理使用者必須要有RECOVERY_CATALOG_OWNER角色
RMAN> exit
Recovery Manager complete.
[oracle@rhel5 ~]$ sqlplus / as sysdba
SQL> grant recovery_catalog_owner to scott;
Grant succeeded.
-- 授權後再次建立CATALOG
[oracle@rhel5 ~]$ rman catalog
RMAN> create catalog;
recovery catalog created
-- 建立CATALOG管理使用者
[oracle@rhel5 ~]$ sqlplus / as sysdba
SQL> create user rman identified by rman;
User created.
SQL> grant recovery_catalog_owner to rman;
Grant succeeded.
SQL> alter user rman quota 100m on user01;
User altered.
SQL> grant connect,resource to rman;
Grant succeeded.
[oracle@rhel5 ~]$ rman catalog
RMAN> --刪除catalog
RMAN> drop catalog;
recovery catalog owner is SCOTT
enter DROP CATALOG command again to confirm catalog removal
RMAN> drop catalog;
recovery catalog dropped
-- 建立RMAN使用者管理的CATALOG
[oracle@rhel5 ~]$ rman catalog
RMAN> create catalog;
recovery catalog created
-- RMAN使用者生成了CATALOG管理的相關物件
[oracle@rhel5 ~]$ sqlplus rman/rman
SQL*Plus: Release 10.2.0.5.0 - Production on Thu Sep 5 04:26:46 2013
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select * from tab;
TNAME TABTYPE CLUSTERID
------------------------------ ------- ----------
RC_BACKUP_SET_SUMMARY VIEW
RC_BACKUP_DATAFILE_SUMMARY VIEW
RC_BACKUP_CONTROLFILE_SUMMARY VIEW
RC_BACKUP_ARCHIVELOG_SUMMARY VIEW
RC_BACKUP_SPFILE_SUMMARY VIEW
RC_BACKUP_COPY_SUMMARY VIEW
RC_PROXY_COPY_SUMMARY VIEW
RC_PROXY_ARCHIVELOG_SUMMARY VIEW
RC_UNUSABLE_BACKUPFILE_DETAILS VIEW
RC_RMAN_BACKUP_TYPE VIEW
XAL TABLE
RSR TABLE
FB TABLE
GRSP TABLE
RC_DATABASE VIEW
RC_DATABASE_INCARNATION VIEW
RC_RESYNC VIEW
RC_CHECKPOINT VIEW
RC_TABLESPACE VIEW
RC_DATAFILE VIEW
RC_TEMPFILE VIEW
RC_REDO_THREAD VIEW
RC_REDO_LOG VIEW
RC_LOG_HISTORY VIEW
RC_ARCHIVED_LOG VIEW
RC_BACKUP_SET VIEW
RC_BACKUP_PIECE VIEW
RC_BACKUP_DATAFILE VIEW
RC_BACKUP_CONTROLFILE VIEW
RC_BACKUP_SPFILE VIEW
RC_DATAFILE_COPY VIEW
RC_CONTROLFILE_COPY VIEW
RC_BACKUP_REDOLOG VIEW
RC_BACKUP_CORRUPTION VIEW
RC_COPY_CORRUPTION VIEW
RC_OFFLINE_RANGE VIEW
RC_STORED_SCRIPT VIEW
RC_STORED_SCRIPT_LINE VIEW
RC_PROXY_DATAFILE VIEW
RC_PROXY_CONTROLFILE VIEW
RC_RMAN_CONFIGURATION VIEW
RC_DATABASE_BLOCK_CORRUPTION VIEW
RC_PROXY_ARCHIVEDLOG VIEW
RC_RMAN_STATUS VIEW
ROUT TABLE
RC_RMAN_OUTPUT VIEW
RCVER TABLE
RC_BACKUP_FILES VIEW
RC_RMAN_BACKUP_SUBJOB_DETAILS VIEW
RC_RMAN_BACKUP_JOB_DETAILS VIEW
RC_BACKUP_SET_DETAILS VIEW
RC_BACKUP_PIECE_DETAILS VIEW
RC_BACKUP_COPY_DETAILS VIEW
RC_PROXY_COPY_DETAILS VIEW
RC_PROXY_ARCHIVELOG_DETAILS VIEW
RC_BACKUP_DATAFILE_DETAILS VIEW
RC_BACKUP_CONTROLFILE_DETAILS VIEW
RC_BACKUP_ARCHIVELOG_DETAILS VIEW
RC_BACKUP_SPFILE_DETAILS VIEW
DB TABLE
NODE TABLE
CONF TABLE
DBINC TABLE
CKP TABLE
TS TABLE
TSATT TABLE
DF TABLE
DFATT TABLE
TF TABLE
TFATT TABLE
OFFR TABLE
RR TABLE
RT TABLE
ORL TABLE
RLH TABLE
AL TABLE
BS TABLE
BP TABLE
BCF TABLE
CCF TABLE
XCF TABLE
BSF TABLE
BDF TABLE
CDF TABLE
XDF TABLE
BRL TABLE
BCB TABLE
CCB TABLE
SCR TABLE
SCRL TABLE
CONFIG TABLE
91 rows selected.
-- 將目標庫註冊為CATALOG管理
[oracle@rhel5 ~]$ rman target / catalog
Recovery Manager: Release 10.2.0.5.0 - Production on Thu Sep 5 04:27:09 2013
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: WAILON (DBID=2747751647)
connected to recovery catalog database
RMAN> --註冊catalog
RMAN> register database;
database registered in recovery catalog
starting full resync of recovery catalog
full resync complete
-- 使用CATALOG管理後可以建立RMAN管理的備份指令碼
RMAN> create script full_backup
2> {
3> backup database;
4> delete obsolete;
5> }
-- 執行備份指令碼
RMAN> run {execute script full_backup;}
executing script: full_backup
Starting backup at 05-SEP-13
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=21 devtype=DISK
channel ORA_DISK_1: starting compressed full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/u01/app/oracle/oradata/wailon/system01.dbf
input datafile fno=00003 name=/u01/app/oracle/oradata/wailon/sysaux01.dbf
input datafile fno=00002 name=/u01/app/oradata/wailon/untotbs01.dbf
input datafile fno=00004 name=/u01/app/oracle/oradata/wailon/user01.dbf
channel ORA_DISK_1: starting piece 1 at 05-SEP-13
channel ORA_DISK_1: finished piece 1 at 05-SEP-13
piece handle=/u01/app/flash_recovery_area/0coj2dmt_1_1.bkp tag=TAG20130905T042812 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting compressed full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 05-SEP-13
channel ORA_DISK_1: finished piece 1 at 05-SEP-13
piece handle=/u01/app/flash_recovery_area/0doj2dnc_1_1.bkp tag=TAG20130905T042812 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 05-SEP-13
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03015: error occurred in stored script full_backup
RMAN-03002: failure of delete command at 09/05/2013 04:28:31
RMAN-06525: RMAN retention policy is set to none
-- 檢視備份指令碼
RMAN> print script full_backup;
printing stored script: full_backup
{backup database;
delete obsolete;
}
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31536640/viewspace-2155675/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle 備份恢復篇之RMAN catalogOracle
- Oracle Rman Catalog的建立方法和備份原理Oracle
- 備份恢復Lesson 04.Using the RMAN Recovery Catalog
- Oracle RMAN備份實戰Oracle
- Oracle OCP(60):RMAN 備份Oracle
- 【RMAN】Oracle12c之後,rman備份Dataguard備端恢復可能出現邏輯錯誤Oracle
- 分享Oracle Rman的備份指令碼Oracle指令碼
- oracle 12c rman備份pdbOracle
- oracle資料庫備份之exp增量備份Oracle資料庫
- Oracle 備份恢復之 FlashbackOracle
- oracle10g RMAN增量備份策略Oracle
- ORACLE DG從庫 Rman備份恢復Oracle
- Oracle RMAN備份以及壓縮原理分析Oracle
- 【RMAN】RMAN備份至ASMASM
- Oracle ADG環境下的RMAN備份策略Oracle
- oracle資料庫使用rman備份指令碼Oracle資料庫指令碼
- RMAN備份概述
- oracle邏輯備份之--資料泵Oracle
- 【RMAN】RMAN的備份保留策略
- 【RMAN】Oracle12c以後rman 備份恢復命令參考Oracle
- RMAN備份恢復典型案例——RMAN備份&系統變慢
- 2012-06-03 20:40 catalog start with rman備份集直接匯入控制檔案中
- RMAN備份進度
- rman 備份指令碼指令碼
- RMAN的備份原理
- Oracle9i RMAN 的優缺點及RMAN 備份及恢復步驟Oracle
- RMAN備份恢復技巧
- 【rman備份策略】實驗
- rman 增量備份恢復
- 【RMAN】Oracle中如何備份控制檔案?備份控制檔案的方式有哪幾種?Oracle
- Windows oracle 11g rman備份恢復到linux系統WindowsOracleLinux
- Oracle RMAN備份為什麼會大量使用temp表空間?Oracle
- 【BASIS】HANA備份指令碼,Catalog自動清理指令碼
- RMAN之環境配置(二)---Backups to a Media Manager備份到介質管理器
- 【RMAN】同時建立多個備份(建立多重備份)
- 【RMAN】在備庫執行rman備份時報錯RMAN-06820 ORA-17629
- RMAN 備份相關的概念
- [20190522]rman備份問題.txt