1

My client's Oracle 10g database crashed abruptly on Win 2003 NT. The oracle was installed on C drive and redo logs, ctl files and .dbf files were in D: It was unable to backup C: but successfully backup D: Later the system was rebuild with updated RAM and high disk size. Oracle is re_install in C: as it was and latest .dbf, CTL and redo logs in D:

Not sure if the below steps would solve the purpose. Please suggest ASAP.

SQL> startup nomount;
SQL> alter system set control_files
Then you mount the database so control file can be read and written
SQL> alter database mount;
SQL> alter database rename file for .dbf files 
SQL> alter database rename file for redo logs

If it would be using PFILE then will use Init.ora to update the location.

SQL>startup mount
SQL> ALTER DATABASE OPEN;
  • 1
    Can you provide your backup information ? what backup type you have ? – Eko Junaidi Salam Jun 28 '16 at 7:21
  • It was simply the copy/paste from one disk to other. No specific backup tool was used to recover the DB files. – user3256224 Jun 28 '16 at 8:44
  • 1
    Was the database up when you "simply the copy/paste from one disk to other"? If the database was not cleanly shutdown when you did that, then you have no backup. Those data files will be inconsistent with each other and probably internally inconsistent. – EdStevens Jun 28 '16 at 21:59
  • so you are just missing the (s)pfile? – Jack Douglas Jan 25 '17 at 9:52
-2

Alright, let's assume you have full backup without archivelog. And your backup is output from rman backup such as rman> BACKUP DATABASE;.

So, I'll explain how to restore it.

1) Make sure your DBID is same as your database. (Note : this process is used if you have full backup datafiles,controlfiles,spfile, and copy archivelog if you have.)

SQL> SELECT DBID,OPEN_MODE FROM V$DATABASE; (if you can access your database)
RMAN> SHUTDOWN IMMEDIATE;STARTUP NOMOUNT;
RMAN> SET DBID=your_db_id

ex : G:\rman_backup is your backup location. If you just to restore your controlfile and datafile, ignore process number 1, continue to process 2.

2) Make sure your autobackup location of CONTROLFILE, SPFILE and DATAFILE also ARCHIVELOG ex : "D:\FLASH_RECOVERY_AREA\your_sid\AUTOBACKUP\2016_06_16\O1_MF_S_914709345_CP5HHNCS_.BKP" or"G:\rman_backup\O1_MF_S_914709345_CP5HHNCS_.BKP".

In this example i assume you have activate your autobackup controlfile, if you don't need to restore your spfile skip this. you can next to restore control file.

RMAN> RESTORE SPFILE TO 'C:\app\Administrator\SPFILESIMKARI.ORA' FROM 'G:\rman_backup\O1_MF_S_914709345_CP5HHNCS_.BKP';
RMAN> SHUTDOWN IMMEDIATE;STARTUP NOMOUNT;
RMAN> RESTORE CONTROLFILE FROM 'G:\rman_backup\O1_MF_S_914709345_CP5HHNCS_.BKP';
RMAN> SHUTDOWN IMMEDIATE;STARTUP MOUNT;
RMAN> LIST BACKUP;
RMAN> CATALOG START WITH 'G:\rman_backup'; -- This is optional, if your control file can show "list backup" you don't need to run this. If not, you must to run this script.
RMAN> RESTORE DATABASE;
RMAN> RECOVER DATABASE;
RMAN> ALTER DATABASE OPEN; -- If you need to reset your sequence, or error you can "alter database open resetlogs", if not "alter database open noresetlogs";
RMAN> exit

For additional information, you can startup unmount if your SPFILE is configured properly. And `startup mount' if your controlfile is configured properly. Hope this help you out, please comment if you've trouble.

  • 2
    I don't think RMAN was used to backup the database. It was just the physical .DBF files, ctl files and redo logs. – user3256224 Jun 28 '16 at 8:46
  • 2
    You can't recover .dbf .ctl dkk without properly backup. You can recover it if you have another physical datafiles, controlfile, and logfile that Exactly same as your database. – Eko Junaidi Salam Jun 28 '16 at 12:55
  • 1
    This answer makes far too many assumptions. All he has is the datafiles, controlfile and redo logs as they existed when the database went down. How does he extract the DBID from them? How can he use RMAN to make these files usable by his new instance? – Andrew Brennan Jul 5 '16 at 16:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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