資料檔案丟失之後的恢複

來源:互聯網
上載者:User
恢複|資料  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



我的環境是linux9 oracle 8.1.7.4
出現問題的當時是,一台機器連到上面做insert into 操作,資料大概有63萬條。
正在執行的過程中因為到了下班的時間,伺服器設定的定時自動關機的功能,伺服器
在五點半的時候關機,導致insert into 操作中斷,等伺服器起來之後,提示一個表資料檔案有問題,我就執行了
shutdown immediate
startup mount
recover datafile '/datafile.dbf'
提示恢複成功
startup
就出現上面的錯誤提示

 終於搞定了,採取的步驟是把,受到影響的資料表空間何資料檔案drop 掉
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!!!!!






相關文章

Cloud Intelligence Leading the Digital Future

Alibaba Cloud ACtivate Online Conference, Nov. 20th & 21st, 2019 (UTC+08)

Register Now >

Starter Package

SSD Cloud server and data transfer for only $2.50 a month

Get Started >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。