出現問題:
SQL> startup;
ORACLE instance started.
Total System Global Area 2371719168 bytes
Fixed Size 2215624 bytes
Variable Size 1342177592 bytes
Database Buffers 1023410176 bytes
Redo Buffers 3915776 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 6 - see DBWR trace file
ORA-01110: data file 6: '/opt/oracle/oradata/orcl/srcmsg.dbf'
解決辦法:
1.關庫
SQL> shutdown immediate;
- alter database open
ORA-01157: cannot identify/lock data file 10 - see DBWR trace file
ORA-01110: data file 12: '/oradata/orcldata/sacproduce02.dbf'
報錯信息爲不能進行讀寫操作,掛載的硬盤不能進行讀寫操作了。要打開數據庫,只能將該文件進行離線操作了。 - SQL> archive log list; //查一下數據庫的歸檔模式,
Database log mode No Archive Mode //非歸檔模式
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 4
Current log sequence 6
若歸檔模式下,則:
alter database datafile '/oradata/orcldata/sacproduce02.dbf' offline
非歸檔模式下(現在情況)
alter database datafile '/oradata/orcldata/sacproduce02.dbf'offline drop
SQL> alter database datafile '/opt/oracle/oradata/orcl/srcmsg.dbf' offline drop;
Database altered.
SQL> alter database datafile '/opt/oracle/oradata/orcl/srcmsg.dbf' offline;
Database altered.
最後打開數據庫就可以了