Wednesday, October 19, 2011

Datafile issue while db is in no arch log mode ..


Datafile issue while db is in no arch log mode ..

I had a tablespace ccalled example with data file '/oradata9/source_data/sourcedb/example01.dbf'
and database is in not in arch log mode.

I played with that file and corrupted it.

Then I tried:

1. Taking it offline:

SQL> Alter database datafile  '/oracle/test_lob12.dbf' offline;
Alter database datafile  '/oracle/test_lob12.dbf' offline
*
ERROR at line 1:
ORA-01516: nonexistent log file, data file, or temporary file
"/oracle/test_lob12.dbf"

2. Shutdown the db

SQL> shutdown immediate;
ORA-01122: database file 366 failed verification check
ORA-01110: data file 366: '/oradata9/source_data/sourcedb/example01.dbf'
ORA-01210: data file header is media corrupt

and I ended upo with errors ...

Then I tried the following:

ALTER DATABASE DATAFILE '/oradata9/source_data/sourcedb/example01.dbf' OFFLINE DROP;



SQL> ALTER DATABASE DATAFILE '/oradata9/source_data/sourcedb/example01.dbf' OFFLINE DROP;

Database altered.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup;
ORACLE instance started.

Total System Global Area 2.3517E+10 bytes
Fixed Size                  2230320 bytes
Variable Size            1.1409E+10 bytes
Database Buffers         1.2080E+10 bytes
Redo Buffers               26517504 bytes
Database mounted.
Database opened.


Then drop it normally.

No comments:

Post a Comment