本篇主要練習利用打開時的備貨進行不完全恢复。
[@more@]SYS@HUIYI>select * from t; COL ------------------ 09-Mar-07 10:42:05 SYS@HUIYI>@open_backup; SYS@HUIYI>insert into t values(sysdate); 1 row created. SYS@HUIYI>commit; Commit complete. SYS@HUIYI>select * from t; COL ------------------ 09-Mar-07 10:42:05 09-Mar-07 16:22:55 SYS@HUIYI>drop tablespace tbs01 including contents and datafiles; Tablespace dropped. SYS@HUIYI>alter system switch logfile; System altered. SYS@HUIYI>/ System altered. SYS@HUIYI>/ System altered. SYS@HUIYI>shutdown immediate; Database closed. Database dismounted. ORACLE instance shut down. SYS@HUIYI>host copy g:bbackuphot*.dbf %oracle_home%oradatahuiyi /y SYS@HUIYI>host copy g:bbackuphot*.ctl %oracle_home%oradatahuiyicontrol01.ctl /y g:bbackuphotBACKUP.CTL 1 file(s) copied. SYS@HUIYI>host copy g:bbackuphot*.ctl %oracle_home%oradatahuiyicontrol02.ctl /y g:bbackuphotBACKUP.CTL 1 file(s) copied. SYS@HUIYI>host copy g:bbackuphot*.ctl %oracle_home%oradatahuiyicontrol03.ctl /y g:bbackuphotBACKUP.CTL 1 file(s) copied. SYS@HUIYI>startup mount; ORACLE instance started. Total System Global Area 143727516 bytes Fixed Size 453532 bytes Variable Size 109051904 bytes Database Buffers 33554432 bytes Redo Buffers 667648 bytes Database mounted. Fri Mar 09 16:24:03 2007 drop tablespace tbs01 including contents and datafiles Fri Mar 09 16:24:04 2007 Deleted file G:A9IORADATAHUIYITBS01.DBF Completed: drop tablespace tbs01 including contents and dataf SYS@HUIYI>recover database until time '2007-03-09 16:24:03' using backup controlfile; ORA-00279: change 486129080 generated at 03/09/2007 16:21:36 needed for thread 1 ORA-00289: suggestion : D:ARCHIVELOGHUIYIARC00003.001 ORA-00280: change 486129080 for thread 1 is in sequence #3 Specify log: {=suggested | filename | AUTO | CANCEL} auto ORA-00279: change 486129247 generated at 03/09/2007 16:22:22 needed for thread 1 ORA-00289: suggestion : D:ARCHIVELOGHUIYIARC00004.001 ORA-00280: change 486129247 for thread 1 is in sequence #4 ORA-00278: log file 'D:ARCHIVELOGHUIYIARC00003.001' no longer needed for this recovery Log applied. Media recovery complete. SYS@HUIYI>alter database open resetlogs; Database altered. SYS@HUIYI>select * from t; COL ------------------ 09-Mar-07 10:42:05 09-Mar-07 16:22:55
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/8799875/viewspace-903653/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/8799875/viewspace-903653/