Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I recently had on Oracle 11g Express database crash.

I have copied the .dbf files from C:\oraclexe\app\oracle\oradata\XE to another folder and reinstalled Oracle 11g Express.

The files are:

  1. Control.dbf
  2. sysaux.dbf
  3. system.dbf
  4. TEMP.DBF
  5. UNDOTBS1.DBF
  6. USERS.DBF

I want to remount the old database files, so that I can recover the database.

Can you please tell me how can I do this?

share|improve this question
add comment

migrated from stackoverflow.com Jul 15 '13 at 7:18

This question came from our site for professional and enthusiast programmers.

1 Answer

The information about database data files and online redo log files along with their paths is stored in the control file(s). The information about the control file path is stored in initialization parameter file (pfile) or in server parameter file (spfile).

So if you moved your data files, online redo log files and/or control file(s) you should update the paths in the appropriate files to reflect the changes before you can mount and open the database.

First, you alter you parameter file with new information after you successfully started the instance:

SQL> startup nomount;
SQL> alter system set control_files = '/oracle/data/control.dbf';

Then you mount the database so control file can be read and written:

SQL> alter database mount;

After database is mounted you can use RENAME FILE command to set the new pats to data files and online redo log files:

SQL> alter database rename file '/u01/data/sysaux.dbf'
  to '/oracle/data/sysaux.dbf';


SQL> alter database rename file '/u01/data/redo_1a.dbf'
  to '/oracle/data/redo_1a.dbf';

If your online redo is damaged – you didn't specify redo log files names in the list – and database was not shut down orderly, then data files and control file(s) are in inconsistent state and the only way to open your database is to restore and recover it from a previous backup.

share|improve this answer
    
If your database was shut down orderly, and online redo log files are corrupted, you can drop online redo log groups and members while the database is in mounted state, and recreate them in the new destination. For more info, read "Managing the Redo Log" in Database Administrator's Guide. –  Yasir Arsanukaev Jul 15 '13 at 8:26
    
I followed a process on oracle OTN. <br/> on sql prompt I used connect / as sysdba. then shutdown immediate. then replaced the database files by my recovered one. then startup database; then recover database till cancel; but I got an error that file is more recent than control file. Please help. –  Prathamesh Jul 16 '13 at 5:24
    
I followed your process. I am getting error cannot edit init SQL> alter system set control_files='C:\oraclexe\app\oracle\oradata\XE\control.d bf'; alter system set control_files='C:\oraclexe\app\oracle\oradata\XE\control.dbf' * ERROR at line 1: ORA-02095: specified initialization parameter cannot be modi –  Prathamesh Jul 16 '13 at 5:34
    
Probably your database is using pfile. If so, locate the file init.ora and edit it with your favourite text editor to update control_files parameter value in it, then startup mount the database. –  Yasir Arsanukaev Jul 16 '13 at 5:55
    
I edited the init.ora file. then entered the command startup mount; received message database mounted. But now I cannot access the database; it says oracle initialization/shutdown in process –  Prathamesh Jul 16 '13 at 6:44
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.