創(chuàng)建catalog數(shù)據(jù)庫步驟
創(chuàng)建catalog數(shù)據(jù)庫步驟:
步驟一:創(chuàng)建恢復目錄用戶
step1: 為恢復目錄單***建表空間catalog_tbs,
創(chuàng)建恢復目錄用戶 CREATE USER rcat_user IDENTIFIED BY rcat_password DEFAULT TABLESPACE catalog_tbs;
step2: 為恢復目錄授予下列角色
connect
resource
recovery_catalog_owner
GRANT connect,resource,recovery_catalog_owner TO rcat_user;
步驟二:創(chuàng)建恢復目錄模式對象
step1: 使用RMAN連接的恢復目錄
RMAN
catalog=rcat_user/rcat_password
step2: 在RMAN 提示符下執(zhí)行create catalog命令
create catalog tablespace catalog_tbs;
步驟三:在恢復目錄中注冊數(shù)據(jù)庫
step1: 使用RMAN 同時連接到數(shù)據(jù)庫和恢復目錄
set ORACLE_SID=main_db
RMAN target=backup_admin/backupuserpassword
catalog=rcat_user/rcat_password@recover
step2: 使用恢復目錄注冊數(shù)據(jù)庫
RMAN>Register database;
rman catalog,撤消目標數(shù)據(jù)庫注冊
步驟一:進入要撤消注冊的數(shù)據(jù)庫,獲取這個數(shù)據(jù)庫的DBID
SQL>select dbid from v$database;
DBID
2539725638
步驟二:連接擁有恢復目錄的模式,確定恢復目錄中該數(shù)據(jù)庫的DB_KEY
SQL>select db_key from db where db_id=2539725638
DB_KEY
1
步驟三:使用dbms_rcvcat.unregisterdatabase過程從恢復目錄中撤消數(shù)據(jù)庫的注冊
exec dbms_rcvcat.unregisterdatabase(1,2539725638)
按照上文中講解的步驟就能夠完成創(chuàng)建catalog數(shù)據(jù)庫的工作,希望大家都能夠從上文中有所收獲,然后熟練掌握創(chuàng)建catalog數(shù)據(jù)庫的步驟,這對大家日后的工作會非常有幫助的。