ITPub博客

首页 > 应用开发 > IT综合 > 恢复案例:无归档,掉电,控制文件全部丢失恢复

恢复案例:无归档,掉电,控制文件全部丢失恢复

原创 IT综合 作者:blue_prince 时间:2005-01-15 16:02:34 0 删除 编辑

1、查看测试表数据:
SQL> select * from t;

         A
----------
         1
         2
         4
         3
         5
         6

6 rows selected.

[@more@]

SQL> insert into t values(7);

1 row created.

SQL> commit;

Commit complete.
2、模拟实例掉电,控制文件全部丢失:
SQL> shutdown abort
ORACLE instance shut down.
SQL> host net stop oracleservicexue
OracleServiceXUE 服务正在停止...
OracleServiceXUE 服务已成功停止。


SQL> host del d:oracleoradataxue*.ctl

SQL> host net start oracleservicexue
OracleServiceXUE 服务正在启动 .....
OracleServiceXUE 服务已经启动成功。

3、启动,报错:
SQL> conn/as sysdba
Connected to an idle instance.
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
ORA-00205: error in identifying controlfile, check alert log for more info
4、重建控制文件并进行恢复:
SQL> create controlfile reuse database XUE noresetlogs noarchivelog
  2  logfile
  3  group 1 'd:oracleoradataxueredo01.log',
  4  group 2 'd:oracleoradataxueredo02.log'
  5  datafile
  6  'd:oracleoradataxuesystem01.dbf',
  7  'd:oracleoradataxueundotbs01.dbf',
  8  'd:oracleoradataxueusers01.dbf',
  9  'd:oracleoradataxuetools01.dbf',
 10  'd:oracleoradataxueindx01.dbf'
 11  character set zhs16gbk;

Control file created.

SQL> recover database;
Media recovery complete.
5、打开数据库,验证恢复成功:
SQL> alter database open;

Database altered.

SQL> select * from t;

         A
----------
         1
         2
         4
         3
         5
         6
         7

7 rows selected.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/60857/viewspace-787110/,如需转载,请注明出处,否则将追究法律责任。

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

注册时间:2007-12-23

  • 博文量
    92
  • 访问量
    2216640