Monday, January 21, 2008

Oracle Incomplete Recovery

SQL> startup nomount
ORACLE instance started.

Total System Global Area 2506067080 bytes
Fixed Size 732296 bytes
Variable Size 855638016 bytes
Database Buffers 1644167168 bytes
Redo Buffers 5529600 bytes
SQL> @ccf_prdoltp.sql
CREATE CONTROLFILE SET DATABASE "UATOLTP" RESETLOGS NOARCHIVELOG
*
ERROR at line 1:
ORA-01503: CREATE CONTROLFILE failed
ORA-00200: controlfile could not be created
ORA-00202: controlfile: '/u02/oradata/uatoltp/control01.ctl'
ORA-27038: skgfrcre: file exists


SQL> !rm /u02/oradata/uatoltp/control*

SQL> @ccf_prdoltp.sql

Control file created.

SQL> recover database until time '2008/01/18:15:30:00' using backup controlfile;ORA-00279: change 2147096221 generated at 01/18/2008 13:49:23 needed for thread
1
ORA-00289: suggestion : /u02/oradata/uatoltp/arch/1_11910.dbf
ORA-00280: change 2147096221 for thread 1 is in sequence #11910


Specify log: {=suggested | filename | AUTO | CANCEL}
AUTO
ORA-00279: change 2147102578 generated at 01/18/2008 14:00:31 needed for thread
1
ORA-00289: suggestion : /u02/oradata/uatoltp/arch/1_11911.dbf
ORA-00280: change 2147102578 for thread 1 is in sequence #11911
ORA-00278: log file '/u02/oradata/uatoltp/arch/1_11910.dbf' no longer needed
for this recovery


ORA-00279: change 2147120789 generated at 01/18/2008 14:29:33 needed for thread
1
ORA-00289: suggestion : /u02/oradata/uatoltp/arch/1_11912.dbf
ORA-00280: change 2147120789 for thread 1 is in sequence #11912
ORA-00278: log file '/u02/oradata/uatoltp/arch/1_11911.dbf' no longer needed
for this recovery


ORA-00279: change 2147139797 generated at 01/18/2008 15:00:23 needed for thread
1
ORA-00289: suggestion : /u02/oradata/uatoltp/arch/1_11913.dbf
ORA-00280: change 2147139797 for thread 1 is in sequence #11913
ORA-00278: log file '/u02/oradata/uatoltp/arch/1_11912.dbf' no longer needed
for this recovery


Log applied.
Media recovery complete.
SQL> alter database open resetlogs;

Database altered.

SQL>