4

Recently my Oracle Installation has been crashed and I reinstalled the Oracle again. I have my old Oracle Data files (.DBF files) which have been recovered from old installation.

Now, I need to restore or reinstate these .DBF files into my new installation, so that I can get all my data and procedures.

Both Old and New Oracle Installation version: Oracle 12c

  • Was the database shut down cleanly? If not, it will be impossible to restore without the online redo logs. – Andrew Brennan Aug 23 '16 at 15:40
3

According to your description, the specific answer depends upon what and how the original backup was done. If it was a cold backup of OS file copy after the database was cleanly shutdown then you can restore the database BUT make sure you also have control and redo log files copied together with the DBF files. First copy all the complete and correct files to the target system in the exacly same location as these were in the original database before. Make sure that the version of the database is same. Then you can simply open the database normally.

Here is a similar post regarding the issue that you have mentioned here. Mounting a database from database files copied from a previous installation

Cold Clonning Using controlfile backup in oracle 11g

  • ,Both Old and New Oracle Installation version: Oracle 12c . FYI – Md Haidar Ali Khan Oct 27 '15 at 12:48
0

Yes, Mostly we restore backups when a media failure has damaged a current data file, control file, or archived redo log or before performing a point-in-time recovery.

I would like to say that before doing any recovery or restoring the database. Be sure about that you have kept all these files like

CONTROL.DBF
 SYSAUX.DBF
 SYSTEM.DBF
 TEMP.DBF
 UNDOTBS1.DBF
 USERS.DBF
 and init.ora file

Also consult with you DBA team , may be apart from that some file also require to keep in safe place. It's depend your environment setup. How you are using oracle 12 c there. If you are using oracle 12c along with any application server & Linux based environment then also try to keep some interface like (sysctl.conf,run.conf etc) for your safety.

Before restore chcek out from your point of view, everything is ok. In point of view from restore from these command.

SQL> conn / as sysdba
Connected.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>

SQL> startup mount
ORACLE instance started.

Total System Global Area   size in bytes
Fixed Size                   size in bytes
Variable Size             size in bytes 
Database Buffers           size in bytes
Redo Buffers                size bytes
Database mounted.

As per Oracle BOL https://docs.oracle.com/database/121/RCMRF/rcmsynta2008.htm some of prerequisites point keep in mind like

1) To restore data files to their current location, the database must be started, mounted, or open with the tablespaces or data files to be restored offline.
2)If you use RMAN in a Data Guard environment, then connect RMAN to a recovery catalog.
3) If you are performing a trial restore of the production database, then perform either of the following actions before restoring the database in the test environment:

a)If the test database uses a fast recovery area that is physically different from the recovery area used by the production database, then set DB_RECOVERY_FILE_DEST in the test database instance to the new location.

b)If the test database uses a fast recovery area that is physically the same as the recovery area used by the production database, then set DB_UNIQUE_NAME in the test database instance to a different name from the production database.

-1

If data file is consistent,you can try that:

shutdown immediate;
cp  youtablespace.dbf /u01/dev1/
startup mount;
alter database rename file '/u02/dev1/youtablespace.dbf' to '/u01/dev1/youtablespace.dbf';
select file_name from dba_data_files;
alter database open;
  • Not really going to work, as the database won't know what's in the .dbf unless it has its associated SYSTEM tablespace with all of the metadata in it. – Philᵀᴹ Oct 28 '15 at 9:30

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.