Restoring COLD backup in the same location

Restoring COLD backup in the same location.

  • Scenario with Networker Media Manager.

Step 1 : Move SPFile for scenario purpose:

[oracle@oratst0001 dbs]$ mv spfilevirtualdb.ora spfilevirtualdb.ora2
[oracle@oratst0001 dbs]$

 

Step 2 : Start Database in nomount:

[oracle@oratst0001 networker]$ rman target /

Recovery Manager: Release 11.2.0.4.0 – Production on Fri Nov 9 07:54:23 2018

connected to target database (not started)

RMAN>
RMAN> startup force nomount

startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file ‘/u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/initvirtualdb.ora’

starting Oracle instance without parameter file for retrieval of spfile
Oracle instance started

Total System Global Area 1068937216 bytes

Fixed Size 2260088 bytes
Variable Size 281019272 bytes
Database Buffers 780140544 bytes
Redo Buffers 5517312 bytes

 

Step 3: Restore SPFile:

RMAN> run
2> {
3> set DBID 1136962510;
4> allocate channel c1 type ‘SBT_TAPE’;
5> send ‘NSR_ENV=(NSR_SERVER=nsrserver.ajara.tech,NSR_CLIENT=nsrclient.ajara.tech,NSR_RECOVER_POOL=nsrrecoverpool.ajara.tech)’;
6> restore spfile from ‘4fthp2pr_1_1’;
7> release channel c1;
8> }executing command: SET DBID

using target database control file instead of recovery catalog
allocated channel: c1
channel c1: SID=19 device type=SBT_TAPE
channel c1: NMDA Oracle v9.1.1.8

sent command to channel: c1

Starting restore at 09-NOV-18

channel c1: restoring spfile from AUTOBACKUP 4fthp2pr_1_1
channel c1: SPFILE restore from AUTOBACKUP complete
Finished restore at 09-NOV-18

released channel: c1

RMAN>

Step 4: verify Restored SPFile:

[oracle@oratst0001 dbs]$ ls -ltr spfile*
-rw——- 1 oracle dba 3584 Nov 9 03:05 spfilevirtualdb.ora1
-rw——- 1 oracle dba 3584 Nov 9 07:32 spfilevirtualdb.ora2
-rw——- 1 oracle dba 3584 Nov 9 07:58 spfilevirtualdb.ora
[oracle@oratst0001 dbs]$

step 5: Shutdown Immediate:

[oracle@oratst0001 dbs]$ sqlplus “/as sysdba”

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 – 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> shut immediate
ORA-01507: database not mounted

ORACLE instance shut down.
SQL>

 

Step 6: start DB in nomount:

[oracle@oratst0001 networker]$ sqlplus “/as sysdba”

Connected to an idle instance.

SQL> startup nomount
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
ORACLE instance started.

Total System Global Area 1068937216 bytes
Fixed Size 2260088 bytes
Variable Size 331350920 bytes
Database Buffers 729808896 bytes
Redo Buffers 5517312 bytes
SQL>

 

Step 7: Restore Controlfile:

RMAN> run
2> {
3> set DBID 1136962510;
4> allocate channel c1 type ‘SBT_TAPE’;
5> send ‘NSR_ENV=(NSR_SERVER=nsrserver.ajara.tech,NSR_CLIENT=nsrclient.ajara.tech,NSR_RECOVER_POOL=nsrrecoverpool.ajara.tech)’;
6> restore controlfile from ‘4gthp2ps_1_1’;
7> release channel c1;
8> }executing command: SET DBID

using target database control file instead of recovery catalog
allocated channel: c1
channel c1: SID=20 device type=SBT_TAPE
channel c1: NMDA Oracle v9.1.1.8

sent command to channel: c1

Starting restore at 09-NOV-18

channel c1: restoring control file
channel c1: restore complete, elapsed time: 00:00:08
output file name=/u01/app/oracle/oradata/virtualdb/control01.ctl
output file name=/u01/app/oracle/fast_recovery_area/virtualdb/control02.ctl
Finished restore at 09-NOV-18

released channel: c1

RMAN>

 

Step 8: Alter database mount:

SQL> alter database mount;

Database altered.

SQL>

 

Step 9: Restore database:

RMAN> run
2> {
3> allocate channel c1 type ‘SBT_TAPE’;
4> send ‘NSR_ENV=(NSR_SERVER=nsrserver.ajara.tech,NSR_CLIENT=nsrclient.ajara.tech,NSR_RECOVER_POOL=nsrrecoverpool.ajara.tech)’;
5> restore database from tag ‘VIRTUALDB_COLD_NOV9’;
6> release channel c1;
7> }allocated channel: c1
channel c1: SID=20 device type=SBT_TAPE
channel c1: NMDA Oracle v9.1.1.8

sent command to channel: c1

Starting restore at 09-NOV-18
Starting implicit crosscheck backup at 09-NOV-18
Crosschecked 4 objects
Finished implicit crosscheck backup at 09-NOV-18

Starting implicit crosscheck copy at 09-NOV-18
Finished implicit crosscheck copy at 09-NOV-18

searching for all files in the recovery area
cataloging files…
no files cataloged

skipping datafile 1; already restored to file /u01/app/oracle/oradata/virtualdb/system01.dbf
skipping datafile 2; already restored to file /u01/app/oracle/oradata/virtualdb/sysaux01.dbf
skipping datafile 3; already restored to file /u01/app/oracle/oradata/virtualdb/undotbs01.dbf
skipping datafile 4; already restored to file /u01/app/oracle/oradata/virtualdb/users01.dbf
Finished restore at 09-NOV-18

released channel: c1

RMAN>

 

Step 10: Verify DB reset Logs:

SQL> select open_resetlogs from v$database;

OPEN_RESETL
———–
ALLOWED

 

Step 11: Open Database with reset logs:

SQL> alter database open resetlogs;

Database altered.

 

Step 12: Verify Database files:

SQL> select name from v$database;

NAME
———
VIRTUALD

SQL> select name from v$datafile;

NAME
——————————————————————————–
/u01/app/oracle/oradata/virtualdb/system01.dbf
/u01/app/oracle/oradata/virtualdb/sysaux01.dbf
/u01/app/oracle/oradata/virtualdb/undotbs01.dbf
/u01/app/oracle/oradata/virtualdb/users01.dbf

SQL> select name,open_mode,log_mode from v$database;

NAME OPEN_MODE LOG_MODE
——— ——————– ————
VIRTUALD READ WRITE ARCHIVELOG

 

See Also: