li
  当前位置:主页 > 问题集锦 > 文章内容
li
问题解疑:关于Oracle隐式offline文件的研究(2)
来源: www.ixdba.net  作者: IXDBA.NET官方    时间:2007-12-20   阅读:20  
本文章共6700字,分2页,当前第2页,快速翻页:
 

creation size=0 block size=8192 status=0x1c head=4 tail=4 dup=1

 tablespace 6, index=6 krfil=6 prev_file=0

 unrecoverable scn: 0x0000.00000000 01/01/1988 00:00:00

 Checkpoint cnt:119 scn: 0x0000.0027a09a 10/21/2006 20:43:07

 Stop scn: 0x0000.0027a163 10/21/2006 20:47:12

 Creation Checkpointed at scn:  0x0000.0000ecc6 07/24/2006 16:35:54

 thread:0 rba:(0x0.0.0)

 enabled  threads:  00000000 00000000 00000000 00000000 00000000 00000000

  00000000 00000000

 Offline scn: 0x0000.00000000 prev_range: 0

 Online Checkpointed at scn:  0x0000.00000000

www.ixdba.net


 thread:0 rba:(0x0.0.0)

 enabled  threads:  00000000 00000000 00000000 00000000 00000000 00000000

  00000000 00000000

 Hot Backup end marker scn: 0x0000.00000000

 aux_file is NOT DEFINED

 

关闭数据库。

SQL> shutdown immediate

ORA-01031: insufficient privileges

SQL> conn /as sysdba

Connected.

SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL>

由于数据文件被offline了,能正常关闭数据库也是正常的。

接下来,重新启动数据库:

SQL> startup

ORACLE instance started.

Total System Global Area  235999352 bytes

Fixed Size                   450680 bytes

Variable Size             201326592 bytes

Database Buffers           33554432 bytes

Redo Buffers                 667648 bytes

Database mounted.

Database opened.

SQL>

正常启动!

查看数据文件信息:

SQL> col name format a40

SQL> select file#,status,name from v$datafile;

 

     FILE# STATUS  NAME

---------- ------- ----------------------------------------

         1 SYSTEM  /opt/oracle/oradata/gaojf/system01.dbf

         2 ONLINE  /opt/oracle/oradata/gaojf/undotbs01.dbf

         3 ONLINE  /opt/oracle/oradata/gaojf/users01.dbf

         4 ONLINE  /opt/oracle/oradata/gaojf/tools01.dbf

         5 ONLINE  /opt/oracle/oradata/gaojf/indx01.dbf

         6 RECOVER /opt/oracle/oradata/gaojf/gaojfdb.dbf

 

6 rows selected.

这个状态也是正常的,由于文件6offline,所以需要恢复。

 

恢复文件6

SQL> recover datafile 6;

ORA-00283: recovery session canceled due to errors

ORA-01110: data file 6: '/opt/oracle/oradata/gaojf/gaojfdb.dbf'

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

ORA-01110: data file 6: '/opt/oracle/oradata/gaojf/gaojfdb.dbf'

QL> quit

Disconnected from Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production

With the Partitioning, OLAP and Oracle Data Mining options

JServer Release 9.2.0.1.0 - Production

此时要将原来的文件还原,然后执行恢复。

[oracle@localhost gaojf]$ ls

c-969541821-20060925-01  control.sql   hotbackup.sql  redo03.log    tools01.dbf control01.ctl       createcontrol.sql  indx01.dbf system01.dbf undotbs01.dbf control02.ctl   gaojfdb.dbf.bak redo01.log     temp01.dbf    users01.dbf control03.ctl       gaojfdb.dbf.nn     redo02.log     test

[oracle@localhost gaojf]$ mv gaojfdb.dbf.nn  gaojfdb.dbf

[oracle@localhost gaojf]$ sqlplus "/as sysdba"

SQL*Plus: Release 9.2.0.1.0 - Production on Sat Oct 21 22:03:17 2006

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

Connected to:

Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production

With the Partitioning, OLAP and Oracle Data Mining options

JServer Release 9.2.0.1.0 - Production

SQL> recover datafile 6;

Media recovery complete.

SQL> alter database datafile 6 online;

Database altered.

SQL> col name format a40

SQL> select file#,status,name from v$datafile;

 

     FILE# STATUS  NAME

---------- ------- ----------------------------------------

         1 SYSTEM  /opt/oracle/oradata/gaojf/system01.dbf

         2 ONLINE  /opt/oracle/oradata/gaojf/undotbs01.dbf

         3 ONLINE  /opt/oracle/oradata/gaojf/users01.dbf

         4 ONLINE  /opt/oracle/oradata/gaojf/tools01.dbf

         5 ONLINE  /opt/oracle/oradata/gaojf/indx01.dbf

         6 ONLINE  /opt/oracle/oradata/gaojf/gaojfdb.dbf

6 rows selected.

SQL>

6号文件恢复正常!

至此,这个过程完全解析!



阅读更多内容<<上一页 · 1 · 2


  上一篇: IT168技术卓越奖年会北京召开在即   下一篇: ORA-01207: old control file完全...
li
 §相关评论  
 热点文章

·IT168技术卓越奖年会北京召开在
·No space left on device: mod
·shm.create(): error creating
·mysql占用cpu特别高问题的解决
·Can't locate Mail/Send.pm in
·Allowed memory size of 83886
·overwritten -- Unclean shutd
·Apache重启失败:name-based s
·(13)Permission denied: make_
·SQL0964C The transaction log
·delete删除大表:SQL0964C The
li
 编辑推荐
·IT168技术卓越奖年会北京召开在
·No space left on device: mod
·shm.create(): error creating
·mysql占用cpu特别高问题的解决
·Can't locate Mail/Send.pm in
·Allowed memory size of 83886
·overwritten -- Unclean shutd
·Apache重启失败:name-based s
·(13)Permission denied: make_
·SQL0964C The transaction log
·delete删除大表:SQL0964C The
li
 相关篇章
·IT168技术卓越奖年会北京召开在即
·apache下安装AWStats步骤以及问题
·数据库启动遭遇ORA-00600: [kelt...
·Oracle Database 11g 7月11日发布
·linux中tar f 参数顺序问题
·ReiserFS将何去何从?我们应该怎...
·ORA-01033:错误解决方案
·RHEL 5 beta 2推出
·回顾2006 Linux不失落的理由
·我的RAC情缘
·ORA-01207: old control file完全...
·光纤网卡和HBA卡有什么区别 ?
·问题小结:Linux下oracle常见安装...
·No space left on device: mod_r...
·shm.create(): error creating s...
·mysql占用cpu特别高问题的解决方...
·Can't locate Mail/Send.pm in @...
·Allowed memory size of 8388608...
·overwritten -- Unclean shutdow...
·Apache重启失败:name-based sha...
 
li
设为首页 | 关于我们 | 技术服务 | 收藏本站 | 网站地图 | 联系方式 | 本站友情连接