Chinaunix首页 | 论坛 | 博客
  • 博客访问: 163996
  • 博文数量: 46
  • 博客积分: 2981
  • 博客等级: 少校
  • 技术积分: 475
  • 用 户 组: 普通用户
  • 注册时间: 2007-11-01 12:43
文章分类

全部博文(46)

文章存档

2010年(4)

2009年(9)

2008年(33)

我的朋友

分类: LINUX

2008-07-18 17:05:27




数据文件丢失之后的恢复

SQL> startup
ORACLE instance started.

Total System Global Area   73109664 bytes
Fixed Size                    73888 bytes
Variable Size              56086528 bytes
Database Buffers           16777216 bytes
Redo Buffers                 172032 bytes
Database mounted.
ORA-03113: end-of-file on communication channel


SQL> conn system/manager as sysdba
Connected.
SQL> select name from datafiles
  2  ;
select name from datafiles
                 *
ERROR at line 1:
ORA-01219: database not open: queries allowed on fixed tables/views only


SQL> select name from v$datafile
  2  ;

NAME
--------------------------------------------------------------------------------
/u01/oradata/EMCDB/system01.dbf
/u01/oradata/EMCDB/tools01.dbf
/u01/oradata/EMCDB/rbs01.dbf
/u01/oradata/EMCDB/temp01.dbf
/u01/oradata/EMCDB/users01.dbf
/u01/oradata/EMCDB/indx01.dbf
/u01/oradata/EMCDB/drsys01.dbf
/u01/oradata/EMCDB/EMCBASE.dbf
/home/oracle/test.dbf
/home/adonis/dwbx_wmstat.dbf
//home/adonis/iwbx_wmindx.dbf

11 rows selected.

SQL> alter database datafile '//home/adonis/iwbx_wmindx.dbf' offline
  2  ;
alter database datafile '//home/adonis/iwbx_wmindx.dbf' offline
*
ERROR at line 1:
ORA-01145: offline immediate disallowed unless media recovery enabled


SQL> alter database datafile '//home/adonis/iwbx_wmindx.dbf' offline drop;

Database altered.

SQL> alter database datafile '/home/adonis/dwbx_wmstat.dbf' offline drop;

Database altered.

SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-03113: end-of-file on communication channel


SQL> select name from v$tablespace;
select name from v$tablespace
*
ERROR at line 1:
ORA-03114: not connected to ORACLE


SQL> connect system/manager as sysdba;
Connected.
SQL>  select name from v$tablespace;

NAME
------------------------------
SYSTEM
TEMP
RBS
INDX
USERS
DRSYS
TOOLS
EMCBASE
TEST_USER
DWBX_WMSTAT
IWBX_WMINDX

11 rows selected.

SQL> alter database tablespace 'DWBX_WMSTAT' offline;
alter database tablespace 'DWBX_WMSTAT' offline
                          *
ERROR at line 1:
ORA-02231: missing or invalid option to ALTER DATABASE


SQL> drop tablespace DWBX_WMSTAT;
drop tablespace DWBX_WMSTAT
*
ERROR at line 1:
ORA-01549: tablespace not empty, use INCLUDING CONTENTS option


SQL> drop tablespace DWBX_WMSTAT INCLUDING CONTENTS;

Tablespace dropped.


SQL> drop tablespace IWBX_WMINDX INCLUDING CONTENTS;

Tablespace dropped.

SQL> alter database open
  2  ;
alter database open
*
ERROR at line 1:
ORA-01531: a database already open by the instance


database open success!!!!!
阅读(902) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~