oracle表空间离线 恢复,system表空间离线损坏修复

system表空间离线损坏修复

-------------------------------------------------模拟system表空间离线损坏--------------------------------

SQL> create table sys.strom (a number) tablespace system;

Table created.

SQL> alter system switch logfile;

System altered.

SQL> insert into sys.strom values(1);

1 row created.

SQL> alter system switch logfile;

System altered.

SQL> commit;

Commit complete.

SQL> insert into sys.strom values(22);

1 row created.

SQL> alter system switch logfile;

System altered.

SQL> commit;

Commit complete.

SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> !

[oracle@station strom_oradata]$ rm -rf /u01/app/oracle/oradata/ORCL/datafile/*system*                 ---删除system表空间

[oracle@station strom_oradata]$ sqlplus /nolog

SQL*Plus: Release 10.2.0.1.0 - Production on Fri Jun 8 15:20:15 2012

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

SQL> conn /as sysdba

Connected to an idle instance.

SQL> startup

ORACLE instance started.

Total System Global Area  281018368 bytes

Fixed Size                  2020192 bytes

Variable Size             155192480 bytes

Database Buffers          121634816 bytes

Redo Buffers                2170880 bytes

Database mounted.

ORA-01157: cannot identify/lock data file 1 - see DBWR trace file

ORA-01110: data file 1:

'/u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_7x4lym26_.dbf'

SQL> !

-------------------------------------------------模拟system表空间离线损坏--------------------------------

-------------------------------------------------system表空间离线损坏修复--------------------------------

[oracle@station strom_oradata]$ cp -rp *system* /u01/app/oracle/oradata/ORCL/datafile/                 ----把老的system表空间考到datafile目录

[oracle@station strom_oradata]$ sqlplus /nolog

SQL*Plus: Release 10.2.0.1.0 - Production on Fri Jun 8 15:21:31 2012

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

SQL> conn /as sysdba

Connected.

SQL> recover tablespace system;

ORA-00279: change 993108 generated at 06/08/2012 15:01:43 needed for thread 1

ORA-00289: suggestion :

/u01/app/oracle/flash_recovery_area/ORCL/archivelog/2012_06_08/o1_mf_1_44_%u_.ar

c

ORA-00280: change 993108 for thread 1 is in sequence #44

Specify log: {=suggested | filename | AUTO | CANCEL}

auto

Log applied.

Media recovery complete.

SQL> alter database open;

Database altered.

SQL> select * from  sys.strom;

A

----------

1

22

-------------------------------------------------system表空间离线损坏修复--------------------------------

SQL>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值