IF YOU LOST ALL CONTROLFILE(RECOVER CONTROLFILE)


bash-3.00$ pwd
/export/d3120/oradata/JUNKDB

bash-3.00$ cp /export/d3120/oradata/JUNKDB/backup/control01.ctl .
bash-3.00$ cp control01.ctl control02.ctl
bash-3.00$ cp control01.ctl control03.ctl

bash-3.00$ ls *.ctl
control01.ctl  control02.ctl  control03.ctl

bash-3.00$ rm *.dbf
bash-3.00$
bash-3.00$
bash-3.00$ ls
arch           control01.ctl  control02.ctl  control03.ctl  redo01.log     redo02.log     redo03.log     backup
bash-3.00$ rm *.ctl  
bash-3.00$ cp ./backup/*.dbf .
bash-3.00$ cp /export/d3120/oradata/JUNKDB/backup/control01.ctl .
bash-3.00$ cp control01.ctl control02.ctl
bash-3.00$ cp control01.ctl control03.ctl
bash-3.00$
bash-3.00$
bash-3.00$ sqlplus "/ as sysdba"

SQL*Plus: Release 10.2.0.2.0 - Production on Wed Nov 27 22:14:04 2013

Copyright (c) 1982, 2005, Oracle.  All Rights Reserved.

Connected to an idle instance.

SQL> startup mount;
ORACLE instance started.

Total System Global Area 1258291200 bytes
Fixed Size                  2126904 bytes
Variable Size             513641416 bytes
Database Buffers          738197504 bytes
Redo Buffers                4325376 bytes
Database mounted.
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open

SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01195: online backup of file 1 needs more recovery to be consistent
ORA-01110: data file 1: '/export/d3120/oradata/JUNKDB/system01.dbf'

SQL> recover database using backup controlfile until cancel;
ORA-00279: change 11166401 generated at 04/27/2013 21:51:00 needed for thread 1
ORA-00289: suggestion : /export/d3120/oradata/JUNKDB/arch/1_2_749583954.dbf
ORA-00280: change 11166401 for thread 1 is in sequence #2

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
AUTO
ORA-00279: change 11186531 generated at 04/27/2013 22:04:32 needed for thread 1
ORA-00289: suggestion : /export/d3120/oradata/JUNKDB/arch/1_3_749583954.dbf
ORA-00280: change 11186531 for thread 1 is in sequence #3
ORA-00278: log file '/export/d3120/oradata/JUNKDB/arch/1_2_749583954.dbf' no
longer needed for this recovery

ORA-00308: cannot open archived log
'/export/d3120/oradata/JUNKDB/arch/1_3_749583954.dbf'
ORA-27037: unable to obtain file status
SVR4 Error: 2: No such file or directory
Additional information: 3

SQL> alter database open resetlogs;

Database altered.

SQL> select status from v$instance;

STATUS
------------
OPEN

SQL>

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: