Accidently overwrote system.dbf - What now?

Posted by Filip Ekberg on Server Fault See other posts from Server Fault or by Filip Ekberg
Published on 2009-10-21T08:04:25Z Indexed on 2012/06/17 3:20 UTC
Read the original article Hit count: 592

I accidentally overwrote system.dbf in /usr/lib/oracle/xe/oradata/XE/system.dbf

Well I did not actually do it accidentally, however I overwrote it because of other failures in the database.

And when I try running the following:

SQL> shutdown
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area  289406976 bytes
Fixed Size                  1258488 bytes
Variable Size              92277768 bytes
Database Buffers          192937984 bytes
Redo Buffers                2932736 bytes
Database mounted.
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open

Now I want to try to Recover the database because starting it in mounted or standard surely doesn't work.

SQL> recover database using backup controlfile;
ORA-00283: recovery session canceled due to errors
ORA-01110: data file 1: '/usr/lib/oracle/xe/oradata/XE/system.dbf'
ORA-01122: database file 1 failed verification check
ORA-01110: data file 1: '/usr/lib/oracle/xe/oradata/XE/system.dbf'
ORA-01206: file is not part of this database - wrong database id

How do I solve this? Is it even possible?

My "real" problem was that I ran the /etc/init.d/oracle-xe configure and it overwrote my old configuration and probably removed passwords and such so my tables were gone, however I found the mytablespace.dbf so I hope that it is possible to recover?

Please shed some light on this.

© Server Fault or respective owner

Related posts about database

Related posts about Oracle