Tuesday, August 30, 2016

How to Restore database using Cold Backup in Noarchivelog Mode Without Online Redo Logs

Restoring a Cold Backup in Noarchivelog Mode Without Online Redo Logs
====================================================================

1. Shut down the instance.
2. Copy the control files and data files back from the backup.
3. Start up the database in mount mode.
4. Open the database with the OPEN RESETLOGS clause.



Step 1. Shut Down the Instance
--------------------------------------------------------------------------------------


$ sqlplus / as sysdba
SQL> shutdown abort;


Step 2. Copy the Files Back(datafiles and controlfiles) from the Backup without redo logfiles backup
----------------------------------------------------------------------------------------------------

$ cp <backup directory>/*.* < database file directory>


Step 3. Start Up the Database in Mount Mode
----------------------------------------------------------------------------------------------------

$ sqlplus / as sysdba
SQL> startup mount



Step 4. Open the Database with the OPEN RESETLOGS Clause
--------------------------------------------------------------------------------------------------

SQL> alter database open resetlogs;

you will get error


ORA-01139: RESETLOGS option only valid after an incomplete database recovery


{SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01139: RESETLOGS option only valid after an incomplete database recovery}


SQL>


SQL> recover database;
ORA-00283: recovery session canceled due to errors
ORA-00264: no recovery required


SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01139: RESETLOGS option only valid after an incomplete database recovery


SQL> recover database until cancel;
Media recovery complete.
SQL>

SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open


SQL>


Now, attempt to open your database with the OPEN RESETLOGS clause:
SQL> alter database open resetlogs;



==========================================
>>> Error you will get:-
==========================================


SQL> startup
ORACLE instance started.

Total System Global Area 1043886080 bytes
Fixed Size                  2259840 bytes
Variable Size             654312576 bytes
Database Buffers          381681664 bytes
Redo Buffers                5632000 bytes
Database mounted.
ORA-03113: end-of-file on communication channel
Process ID: 10280
Session ID: 1 Serial number: 5

***Need shut abort and go step 3

In alert log you will get below error:
---------------------------------------------
ALTER DATABASE OPEN
Errors in file /u01/app/oracle/diag/rdbms/bsnl/bsnl/trace/bsnl_lgwr_10259.trc:
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: '/u01/app/oracle/oradata/bsnl/redo01.log'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/bsnl/bsnl/trace/bsnl_lgwr_10259.trc:
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: '/u01/app/oracle/oradata/bsnl/redo01.log'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/bsnl/bsnl/trace/bsnl_ora_10280.trc:
ORA-00313: open failed for members of log group 1 of thread
ORA-00312: online log 1 thread 1: '/u01/app/oracle/oradata/bsnl/redo01.log'
System state dump requested by (instance=1, osid=10280), summary=[abnormal instance termination].
System State dumped to trace file /u01/app/oracle/diag/rdbms/bsnl/bsnl/trace/bsnl_diag_10249_20160829041454.trc
USER (ospid: 10280): terminating the instance due to error 313
Dumping diagnostic data in directory=[cdmp_20160829041454], requested by (instance=1, osid=10280), summary=[abnormal instance termination].
Instance terminated by USER, pid = 10280

3 comments:

  1. This blog is really awesome and it contains unique information , it is very well done. i like these information whatever you have posted.

    Best Laser Clinic In Chennai

    ReplyDelete