How to restore datafile from Rman by using Avamar


bash-3.2$ sqlplus / as sysdba;
SQL*Plus: Release 11.2.0.4.0 Production on Wed Nov 18 11:49:34 2015
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 1.2831E+10 bytes
Fixed Size 2193544 bytes
Variable Size 2348812152 bytes
Database Buffers 1.0469E+10 bytes
Redo Buffers 11214848 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 10 - see DBWR trace file
ORA-01110: data file 10: '/u01/app/oracle/product/11.2.0.3/db_2/dbs/system2'

Solution:

bash-3.2$ sqlplus / as sysdba;
SQL*Plus: Release 11.2.0.4.0 Production on Wed Nov 18 11:49:34 2015
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup nomount
ORACLE instance started.

Total System Global Area 1.2831E+10 bytes
Fixed Size 2171296 bytes
Variable Size 3992985184 bytes
Database Buffers 8824815616 bytes
Redo Buffers 11231232 bytes

go to RMAN:

RMAN> @@RMAN-ANARDB-7-cred2.rman 2> connect target *; 3> **end-of-file** 4> run { 5> allocate channel c0 type sbt PARMS="SBT_LIBRARY=/opt/AVMRclnt/lib/libobk_avamar64.so" format '%d_%U'; 6> send channel 'c0' '"--libport=37079" "--cacheprefix=ANARDB_c0" "--sysdir=/opt/AVMRclnt/etc" "--bindir=/opt/AVMRclnt/bin" "--vardir=/opt/AVMRclnt/var" "--logfile=/opt/AVMRclnt/var/MOD-1447842473395-2002-Oracle-ANARDB-avtar.log0" "--c tlcallport=37014"'; 7> set until scn 884453150751; 8> restore database; 9> recover database; 10> } 11> alter database open resetlogs; 12> connected to target database: ANARDB (DBID=2479496234, not open)
using target database control file instead of recovery catalog
allocated channel: c0
channel c0: SID=1201 device type=SBT_TAPE
channel c0: EMC|Avamar (avtar backup)
sent command to channel: c0
executing command: SET until clause
Starting restore at 18-NOV-15
Starting implicit crosscheck backup at 18-NOV-15
Finished implicit crosscheck backup at 18-NOV-15
Starting implicit crosscheck copy at 18-NOV-15
Finished implicit crosscheck copy at 18-NOV-15
searching for all files in the recovery area
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: /u01/app/oracle/fast_recovery_area/ANARDB/autobackup/2015_11_18/o1_mf_s_896091345_c4r5ws7b_.bkp
channel c0: starting datafile backup set restore
channel c0: specifying datafile(s) to restore from backup set
channel c0: restoring datafile 00001 to /data/ANARDB/datafile/system01.dbf
channel c0: restoring datafile 00002 to /data/ANARDB/datafile/sysaux01.dbf
channel c0: restoring datafile 00003 to /data/ANARDB/datafile/undotbs01.dbf
channel c0: restoring datafile 00007 to /data/ANARDB/datafile/OC02.dbf
channel c0: reading from backup piece ANARDB_ctqmbpq0_1_1
channel c0: piece handle=ANARDB_ctqmbpq0_1_1 tag=TAG20151115T205943
channel c0: restored backup piece 1
channel c0: restore complete, elapsed time: 00:00:00
channel c0: starting datafile backup set restore
channel c0: specifying datafile(s) to restore from backup set
channel c0: restoring datafile 00004 to /data/ANARDB/datafile/users01.dbf
channel c0: restoring datafile 00005 to /data/ANARDB/datafile/OC01.dbf
channel c0: restoring datafile 00006 to /data/ANARDB/datafile/SS_DB_01.dbf
channel c0: restoring datafile 00008 to /data/ANARDB/datafile/OC03.dbf
channel c0: reading from backup piece ANARDB_csqmbpq0_1_1
channel c0: piece handle=ANARDB_csqmbpq0_1_1 tag=TAG20151115T205943
channel c0: restored backup piece 1
channel c0: restore complete, elapsed time: 00:00:00
Finished restore at 18-NOV-15
Starting recover at 18-NOV-15
channel c0: starting incremental datafile backup set restore
channel c0: specifying datafile(s) to restore from backup set
destination for restore of datafile 00001: /data/ANARDB/datafile/system01.dbf
destination for restore of datafile 00002: /data/ANARDB/datafile/sysaux01.dbf
destination for restore of datafile 00003: /data/ANARDB/datafile/undotbs01.dbf
destination for restore of datafile 00007: /data/ANARDB/datafile/OC02.dbf
channel c0: reading from backup piece ANARDB_d3qmee67_1_1
channel c0: piece handle=ANARDB_d3qmee67_1_1 tag=TAG20151116T205950
channel c0: restored backup piece 1
channel c0: restore complete, elapsed time: 00:00:00
channel c0: starting incremental datafile backup set restore
channel c0: specifying datafile(s) to restore from backup set
destination for restore of datafile 00004: /data/ANARDB/datafile/users01.dbf
destination for restore of datafile 00005: /data/ANARDB/datafile/OC01.dbf
destination for restore of datafile 00006: /data/ANARDB/datafile/SS_DB_01.dbf
destination for restore of datafile 00008: /data/ANARDB/datafile/OC03.dbf
channel c0: reading from backup piece ANARDB_d2qmee67_1_1
channel c0: piece handle=ANARDB_d2qmee67_1_1 tag=TAG20151116T205950
channel c0: restored backup piece 1
channel c0: restore complete, elapsed time: 00:00:00
channel c0: starting incremental datafile backup set restore
channel c0: specifying datafile(s) to restore from backup set
destination for restore of datafile 00001: /data/ANARDB/datafile/system01.dbf
destination for restore of datafile 00002: /data/ANARDB/datafile/sysaux01.dbf
destination for restore of datafile 00003: /data/ANARDB/datafile/undotbs01.dbf
destination for restore of datafile 00007: /data/ANARDB/datafile/OC02.dbf
channel c0: reading from backup piece ANARDB_d9qmh2i9_1_1
channel c0: piece handle=ANARDB_d9qmh2i9_1_1 tag=TAG20151117T205952
channel c0: restored backup piece 1
channel c0: restore complete, elapsed time: 00:00:00
channel c0: starting incremental datafile backup set restore
channel c0: specifying datafile(s) to restore from backup set
destination for restore of datafile 00004: /data/ANARDB/datafile/users01.dbf
destination for restore of datafile 00005: /data/ANARDB/datafile/OC01.dbf
destination for restore of datafile 00006: /data/ANARDB/datafile/SS_DB_01.dbf
destination for restore of datafile 00008: /data/ANARDB/datafile/OC03.dbf
channel c0: reading from backup piece ANARDB_d8qmh2i9_1_1
channel c0: piece handle=ANARDB_d8qmh2i9_1_1 tag=TAG20151117T205952
channel c0: restored backup piece 1
channel c0: restore complete, elapsed time: 00:00:00
starting media recovery
archived log for thread 1 with sequence 1848 is already on disk as file /data/ANARDB/redolog/redo_g02a.log
archived log file name=/data/ANARDB/redolog/redo_g02a.log thread=1 sequence=1848
media recovery complete, elapsed time: 00:00:00
Finished recover at 18-NOV-15
released channel: c0
database opened
Recovery Manager complete.

So we can connect to database:

bash-3.2$ ps -ef | grep smon
 oracle 19170 19147 0 14:41:30 ? 0:03 ora_smon_ANARDB
 oracle 28142 18046 0 16:12:25 pts/2 0:00 grep smon
bash-3.2$ export ORACLE_SID=ANARDB
bash-3.2$ echo $ORACLE_SID
ANARDB
bash-3.2$ sqlplus "/ as sysdba";

SQL*Plus: Release 11.2.0.4.0 Production on Wed Nov 18 16:13:14 2015

Copyright (c) 1982, 2013, Oracle. All rights reserved.




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> select name,open_mode from v$database;

NAME OPEN_MODE
--------- --------------------
ANARDB READ WRITE

SQL>

 

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: