patternMinor
Mounting a database from database files copied from a previous installation
Viewed 0 times
previousmountinginstallationdatabasefilesfromcopied
Problem
I recently had on Oracle 11g Express database crash.
I have copied the
The files are:
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?
I have copied the
.dbf files from C:\oraclexe\app\oracle\oradata\XE to another folder and reinstalled Oracle 11g Express.The files are:
Control.dbf
sysaux.dbf
system.dbf
TEMP.DBF
UNDOTBS1.DBF
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?
Solution
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:
Then you mount the database so control file can be read and written:
After database is mounted you can use
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.
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.
Context
StackExchange Database Administrators Q#46367, answer score: 5
Revisions (0)
No revisions yet.