十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
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 rt1aftercsn1260645 Sending START request to MANAGER ... REPLICAT RT1 starting |