恢復案例:熱備期間例項故障解決

blue_prince發表於2005-01-06
               恢復案例:熱備期間例項故障解決
1、檢視資料庫歸檔及表空間資訊:
SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            d:oracleoradataxuearchive
Oldest online log sequence     86
Next log sequence to archive   87
Current log sequence           87
[@more@]

SQL> select * from v$tablespace;

       TS# NAME                           INC
---------- ------------------------------ ---
         0 SYSTEM                         YES
         1 UNDOTBS1                       YES
         2 TEMP                           YES
         3 INDX                           YES
         4 TOOLS                          YES
         5 USERS                          YES

6 rows selected.
2、對USERS表空間進行熱備
SQL> alter tablespace users begin backup;

Tablespace altered.

SQL> select * from v$backup;

     FILE# STATUS                CHANGE# TIME
---------- ------------------ ---------- ----------
         1 NOT ACTIVE                  0
         2 NOT ACTIVE                  0
         3 NOT ACTIVE                  0
         4 NOT ACTIVE                  0
         5 ACTIVE                 884092 13-12月-04
3、模擬例項故障:
SQL> shutdown abort
ORACLE instance shut down.
3、啟動資料庫、報錯:
SQL> startup
ORACLE instance started.

Total System Global Area   64035360 bytes
Fixed Size                   453152 bytes
Variable Size              41943040 bytes
Database Buffers           20971520 bytes
Redo Buffers                 667648 bytes
Database mounted.
ORA-01113: file 5 needs media recovery
ORA-01110: data file 5: 'D:ORACLEORADATAXUEUSERS01.DBF'
4、檢查熱備對應的資料檔案:
SQL> select * from v$backup;

     FILE# STATUS                CHANGE# TIME
---------- ------------------ ---------- ----------
         1 NOT ACTIVE                  0
         2 NOT ACTIVE                  0
         3 NOT ACTIVE                  0
         4 NOT ACTIVE                  0
         5 ACTIVE                 884092 13-12月-04
5、將熱備的資料檔案結束備份狀態並開啟資料庫:
SQL> alter database datafile 5 end backup;

Database altered.

SQL> alter database open;

Database altered.

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

相關文章