oracle 之catalog 學習

liqilin0429發表於2010-12-06

maintenance
register
resynchronize
reset
change/delete/catalog
backup/restore/recover

creating recovery catalog
1 create tablespace
create tablespace cata datafile  '/u01/oradata/qilin/catalog_01.dbf' size 1024m
segment space management auto exten management local uniform;
2 create catalog owner
create user cata identified by cata default tablespace cata
quota unlimited on cata;
3 grant privileges
grant connect,resource to cata;
grant recovery_catalog_owner to cata;
4 create catalog
 A rman catalog cata/cata@pitts
 B desc user_objects;
 C col object_name format a30;
   select object_name,object_type from user_objects;
 D create catalog tablespace cata;
5 connect to target database
 A rman target  sys/qilin@target
 B connect catalog cata/cata@pitts
6 register target database
register database;
list incarnation;

7 rman target sys/qilin@test catalog cata/cata@pitts
8 control_file_record_keep_time
9 resync catalog
  report schema
  list incarnation;
  rest database to incarnation 11;(target database must startup mount)
  restore database /recover database
 
10 SCRIPT
11 creating local/global stored scripts
12 converting stored scripts  to files
   A print script. delete_arc_logs to file 'c:\tools\delete_arc_logs.rman';
   B create script. delete_arc_logs from file 'c:\tools\delete_arc_logs.rman';
   C relace script. delete_arc_logs from file 'c:\tools\delete_arc_logs.rman';
13 configure retention policy to recovery window of 7 days
   configure retention policy to redundancy 2
14 crosscheck backupset;
   crosscheck of tablespace users;
   crosscheck backupset of database;
   obsolete----&gtpolicy ; delete obsolete
   expired-----&gtdelete disk; delete expired
   delete noprompt(not sure) expired backup of tablespace users;
15 change backupset 49 unavailable;
   list backup;
   change backupset 49 available;
16 exempt(no policy)
   change backupset 123 keep forever nologs
   change datafilecopy '/db01/backup/users01.dbf' keep until 'sysdate+60';
   change backupset tag year_end_2010 nokeep;
17 catalog start with '/u01/app/oracle/backup' noprompt;
   change datafilecopy '/db01/backup/users01.dbf' uncatalog;
   change backuppiece 51 uncatalog;
   catalog backuppiece '/u01/backup/md_1hlqk281_1_1';
   list backup;

 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/20976446/viewspace-681020/,如需轉載,請註明出處,否則將追究法律責任。

相關文章