ITPub博客

首页 > 应用开发 > IT综合 > 恢复案例:热备期间实例故障解决

恢复案例:热备期间实例故障解决

原创 IT综合 作者:blue_prince 时间:2005-01-06 15:36:33 0 删除 编辑
               恢复案例:热备期间实例故障解决
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/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2007-12-23

  • 博文量
    92
  • 访问量
    2216627