run { allocate channel ch01 device type disk; allocate channel ch02 device type disk; backup format '/backup/full_%d_%s_%T_%p.bak' database include current controlfile; sql 'alter system archive log current'; backup archivelog all format '/backup/arch_%d_%s_%T_%p'; release channel ch02; release channel ch01; } |
RMAN> list backup of controlfile; List of Backup Sets =================== BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ ------------------- 37 Full 17.80M DISK 00:00:00 2014-09-28 23:53:06 BP Key: 37 Status: AVAILABLE Compressed: NO Tag: TAG20140928T235259 Piece Name: /backup/full_PROD_36_20140928_1.bak Control File Included: Ckp SCN: 1260618 Ckp time: 2014-09-28 23:53:06 |
SYS@PROD1 > select inst_id,group#,thread#,sequence#,archived,status,first_change# from gv$log order by status; INST_ID GROUP# THREAD# SEQUENCE# ARC STATUS FIRST_CHANGE# ---------- ---------- ---------- ---------- --- ---------------- ------------- 1 3 2 25 NO CURRENT 1260660 2 3 2 25 NO CURRENT 1260660 1 1 1 29 NO CURRENT 1260655 2 1 1 29 NO CURRENT 1260655 1 2 1 28 YES INACTIVE 1260638 1 4 2 24 YES INACTIVE 1260645 2 2 1 28 YES INACTIVE 1260638 2 4 2 24 YES INACTIVE 1260645 |
[root@node3 ~]# su - oracle [oracle@node3 ~]$ rman target / RMAN> startup nomount; Oracle instance started Total System Global Area 672256000 bytes Fixed Size 2256272 bytes Variable Size 520094320 bytes Database Buffers 146800640 bytes Redo Buffers 3104768 bytes |
RMAN> restore controlfile from '/backup/full_PROD_24_20140928_1.bak'; Starting restore at 2014-09-28 20:14:13 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=34 instance=PROD1 device type=DISK channel ORA_DISK_1: restoring control file channel ORA_DISK_1: restore complete, elapsed time: 00:00:01 output file name=+DATA/prod/controlfile/current.260.859387343 output file name=+ARCH/prod/controlfile/current.256.859387345 Finished restore at 2014-09-28 20:14:14 |
SYS@PROD1 > select checkpoint_change# from v$datafile_header; CHECKPOINT_CHANGE# ------------------ 1260645 1260645 1260645 1260645 1260645 1260645 1260645 7 rows selected. SYS@PROD1 > select checkpoint_change# from v$datafile; CHECKPOINT_CHANGE# ------------------ 1260645 1260645 1260645 1260645 1260645 1260645 1260645 |
[oracle@node3 goldengate]$ ggsci GGSCI (node3) 1> DBLOGIN USERID oggadmin,PASSWORD oggadmin GGSCI (node3) 2> ADD CHECKPOINTTABLE oggadmin.checkpointtable GGSCI (node3) 14> DELETE REPLICAT rt1 GGSCI (node3) 15> ADD REPLICAT rt1, EXTTRAIL /goldengate/dirdat/rt, checkpointtable oggadmin.checkpointtable |
GGSCI (node3) 16> start rt1 aftercsn 1260645 Sending START request to MANAGER ... REPLICAT RT1 starting |
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。