Lost redo+control files / Recover Database


bash-3.2$ rm redo0*
bash-3.2$ rm control01.ctl
bash-3.2$ rm "/u01/app/oracle/fast_recovery_area/ANARDB2/control02.ctl"
bash-3.2$ ls -ltr
total 5650988
-rw-r----- 1 oracle oinstall 62922752 Jun 17 07:24 temp01.dbf
-rw-r----- 1 oracle oinstall 817897472 Jun 17 07:25 system01.dbf
-rw-r----- 1 oracle oinstall 639639552 Jun 17 07:25 sysaux01.dbf
-rw-r----- 1 oracle oinstall 83894272 Jun 17 07:25 undotbs01.dbf
-rw-r----- 1 oracle oinstall 1340874752 Jun 17 07:25 example01.dbf
-rw-r----- 1 oracle oinstall 5251072 Jun 17 07:25 users01.dbf
bash-3.2$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Wed Jun 17 07:30:20 2015
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 1258291200 bytes
Fixed Size 3003176 bytes
Variable Size 838864088 bytes
Database Buffers 402653184 bytes
Redo Buffers 13770752 bytes
SQL> CREATE CONTROLFILE REUSE DATABASE "ANARDB2" RESETLOGS NOARCHIVELOG
 2 MAXLOGFILES 16
 3 MAXLOGMEMBERS 3
 4 MAXDATAFILES 100
 5 MAXINSTANCES 8
 6 MAXLOGHISTORY 292
 7 LOGFILE
 8 GROUP 1 '/u01/app/oracle/oradata/ANARDB2/redo01.log' SIZE 50M BLOCKSIZE 512,
 9 GROUP 2 '/u01/app/oracle/oradata/ANARDB2/redo02.log' SIZE 50M BLOCKSIZE 512,
 10 GROUP 3 '/u01/app/oracle/oradata/ANARDB2/redo03.log' SIZE 50M BLOCKSIZE 512
 11 -- STANDBY LOGFILE
 12 DATAFILE
 13 '/u01/app/oracle/oradata/ANARDB2/system01.dbf',
 14 '/u01/app/oracle/oradata/ANARDB2/sysaux01.dbf',
 15 '/u01/app/oracle/oradata/ANARDB2/undotbs01.dbf',
 16 '/u01/app/oracle/oradata/ANARDB2/example01.dbf',
 17 '/u01/app/oracle/oradata/ANARDB2/users01.dbf'
 18 CHARACTER SET WE8MSWIN1252
 19 ;
Control file created.
SQL>
SQL> alter database mount;
alter database mount
*
ERROR at line 1:
ORA-01100: database already mounted
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
bash-3.2$ rman target /
Recovery Manager: Release 12.1.0.2.0 - Production on Wed Jun 17 07:32:31 2015
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
connected to target database: ANARDB2 (DBID=846932035, not open)
RMAN> alter database open resetlogs;
using target database control file instead of recovery catalog
Statement processed
RMAN> exit
Recovery Manager complete.
bash-3.2$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Wed Jun 17 07:33:19 2015
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> select open_mode from v$database;
OPEN_MODE
--------------------
READ WRITE
Advertisements

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: