SQL>create user rman identified by rman default tablespace rman_ts quota unlimited on rman_ts; SQL>grant recovery_catalog_owner to rman;(grant connect to rman) 查看角色所擁有的權(quán)限:
select * from dba_sys_privs where grantee='RECOVERY_CATALOG_OWNER';(RECOVER_CATALOG_OWNER,CONNECT,RESOURCE)
3.創(chuàng)建恢復(fù)目錄
oracle>rman catalog rman/rman RMAN>create catalog tablespace rman_ts; RMAN>register database;(database是target database) database registered in recovery catalog starting full resync of recovery catalog full resync complete --phpfensi.com RMAN> connect target /; 以后要使用備份和恢復(fù),需要連接到兩個(gè)數(shù)據(jù)庫(kù)中,命令:
Recovery Manager: Release 10.2.0.1.0 - Production on Wed Dec 10 15:00:42 2008 Copyright (c) 1982, 2005, Oracle. All rights reserved. connected to target database: ORA10G (DBID=3988862108) connected to recovery catalog database 命令解釋:
SQL> show parameter control NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ control_file_record_keep_time integer 7 control_files string D:/APP/ADMINISTRATOR/ORADATA/O control_management_pack_access string DIAGNOSTIC+TUNING SQL> alter system set control_file_record_keep_time=14 scope=both; 系統(tǒng)已更改.
SQL> select name,value,issys_modifiable from v$parameter where name='control_file_record_keep_time'; NAME VALUE ISSYS_MOD --------------- ---------- --------- control_file_re 14 IMMEDIATE。