Saturday, August 2, 2014

Post 63 of Series : Restore Oracle Database on 11gr2 RAC using RMAN from Tape using Oracle Secure Backup (OSB)


AASAA, FIRST MEHL: There are six systems of philosophy, six teachers, and six doctrines; but the Teacher of teachers is the One Lord, who appears in so many forms. || 1 || That system, where the Praises of the Creator are sung — follow that system; in it rests greatness. || 1 || Pause || As the seconds, minutes,
hours, days, weekdays months and seasons all originate from the one sun, O Nanak, so do all forms originate from the One
Creator. || 2 || 30 ||




Lets restore the database using Oracle Secure Backup (OSB).

Stop the database and drop all the datafiles and controlfiles from ASM.

After dropping all the datafiles and the controlfiles, now lets restore hte database from tape on using Oracle Secure Backup (OSB)

Restore controlfile from tape:
SQL> select dbid from v$database;

      DBID
----------
3927905288

SQL> show parameter control

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time        integer     7
control_files                        string      +DATA/sdiego/controlfile/curre
                                                 nt.260.830971465
control_management_pack_access       string      DIAGNOSTIC+TUNING
SQL>

SQL> alter system set control_files='+DATA','+FLASH' scope=spfile;

System altered.

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

 22:47 : oracle : rac70.rac.meditate.com : @SDIEGO1 : /home/oracle
$ srvctl stop database -d SDIEGO


 22:49 : oracle : rac70.rac.meditate.com : @SDIEGO1 : /home/oracle
$

 22:49 : oracle : rac70.rac.meditate.com : @SDIEGO1 : /home/oracle
$







rman target /
set DBID=3927905288
run {
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
RESTORE CONTROLFILE FROM '3jp6ktn6_1_1';
release channel ch00;
}





 22:49 : oracle : rac70.rac.meditate.com : @SDIEGO1 : /home/oracle
$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Tue Apr 29 22:49:28 2014

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

Connected to an idle instance.

SQL> startup nomount;
ORACLE instance started.

Total System Global Area  384143360 bytes
Fixed Size                  2228624 bytes
Variable Size             243273328 bytes
Database Buffers          134217728 bytes
Redo Buffers                4423680 bytes
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

 22:49 : oracle : rac70.rac.meditate.com : @SDIEGO1 : /home/oracle
$ rman target /

Recovery Manager: Release 11.2.0.3.0 - Production on Tue Apr 29 22:49:51 2014

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: SDIEGO (not mounted)

RMAN> set DBID=3927905288
run {
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
RESTORE CONTROLFILE FROM '3jp6ktn6_1_1';
release channel ch00;
}
executing command: SET DBID

RMAN> 2> 3> 4> 5>

using target database control file instead of recovery catalog
allocated channel: ch00
channel ch00: SID=34 instance=SDIEGO1 device type=SBT_TAPE
channel ch00: Oracle Secure Backup

Starting restore at 29-APR-14

channel ch00: restoring control file
channel ch00: restore complete, elapsed time: 00:00:46
output file name=+DATA/sdiego/controlfile/current.275.846197443
output file name=+FLASH/sdiego/controlfile/current.318.846197447
Finished restore at 29-APR-14

released channel: ch00

RMAN>




23:01 : oracle : rac70.rac.meditate.com : @SDIEGO1 : /home/oracle
$ sqlplus  / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Tue Apr 29 23:01:50 2014

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


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

SQL> show parameter control

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time        integer     7
control_files                        string      +DATA/sdiego/controlfile/curre
                                                 nt.275.846197443, +FLASH/sdieg
                                                 o/controlfile/current.318.8461
                                                 97447
control_management_pack_access       string      DIAGNOSTIC+TUNING
SQL> alter database mount;

Database altered.

SQL>



rman target /
run
{
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE';
set until time "to_date('2014-04-25 19:05:04','YYYY-MM-DD hh24:mi:ss')";
RESTORE DATABASE;
recover database;
release channel t1;
release channel t2;
}








RMAN> run
{
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE';
set until time "to_date('2014-04-25 19:05:04','YYYY-MM-DD hh24:mi:ss')";
RESTORE DATABASE;
recover database;
release channel ch00;
release channel ch01;
}2> 3> 4> 5> 6> 7> 8> 9> 10>

allocated channel: ch00
channel ch00: SID=37 instance=SDIEGO1 device type=SBT_TAPE
channel ch00: Oracle Secure Backup

allocated channel: ch01
channel ch01: SID=38 instance=SDIEGO1 device type=SBT_TAPE
channel ch01: Oracle Secure Backup

executing command: SET until clause

Starting restore at 29-APR-14

channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00001 to +DATA/sdiego/datafile/system.256.830971357
channel ch00: restoring datafile 00003 to +DATA/sdiego/datafile/undotbs1.258.830971359
channel ch00: restoring datafile 00005 to +DATA/sdiego/datafile/example.264.830971505
channel ch00: restoring datafile 00010 to +DATA/sdiego/datafile/ggdata.272.839362901
channel ch00: reading from backup piece 3ip6kt8k_1_1
channel ch01: starting datafile backup set restore
channel ch01: specifying datafile(s) to restore from backup set
channel ch01: restoring datafile 00002 to +DATA/sdiego/datafile/sysaux.257.830971359
channel ch01: restoring datafile 00004 to +DATA/sdiego/datafile/users.259.845573737
channel ch01: restoring datafile 00006 to +DATA/sdiego/datafile/undotbs2.265.830971971
channel ch01: restoring datafile 00007 to +DATA/sdiego/datafile/read.269.838771155
channel ch01: restoring datafile 00008 to +DATA/sdiego/datafile/goldengate.270.839193779
channel ch01: reading from backup piece 3hp6kt8j_1_1
channel ch00: piece handle=3ip6kt8k_1_1 tag=TAG20140425T185307
channel ch00: restored backup piece 1
channel ch00: restore complete, elapsed time: 00:05:05
channel ch01: piece handle=3hp6kt8j_1_1 tag=TAG20140425T185307
channel ch01: restored backup piece 1
channel ch01: restore complete, elapsed time: 00:06:46
Finished restore at 29-APR-14

Starting recover at 29-APR-14
datafile 7 not processed because file is read-only

starting media recovery

archived log for thread 1 with sequence 414 is already on disk as file +FLASH/sdiego/archivelog/2014_04_25/thread_1_seq_414.286.845838239
archived log for thread 1 with sequence 415 is already on disk as file +FLASH/sdiego/archivelog/2014_04_26/thread_1_seq_415.290.845870441
archived log for thread 2 with sequence 340 is already on disk as file +FLASH/sdiego/archivelog/2014_04_25/thread_2_seq_340.284.845838235
archived log for thread 2 with sequence 341 is already on disk as file +FLASH/sdiego/archivelog/2014_04_25/thread_2_seq_341.287.845849531
archived log file name=+FLASH/sdiego/archivelog/2014_04_25/thread_1_seq_414.286.845838239 thread=1 sequence=414
archived log file name=+FLASH/sdiego/archivelog/2014_04_25/thread_2_seq_340.284.845838235 thread=2 sequence=340
archived log file name=+FLASH/sdiego/archivelog/2014_04_26/thread_1_seq_415.290.845870441 thread=1 sequence=415
archived log file name=+FLASH/sdiego/archivelog/2014_04_25/thread_2_seq_341.287.845849531 thread=2 sequence=341
media recovery complete, elapsed time: 00:00:15
Finished recover at 29-APR-14

released channel: ch00
released channel: ch01
RMAN>




obtool documentation:
  


O my wandering mind, you are like a camel — how will you meet the Lord, your Mother? When I found the Guru, by the
destiny of perfect good fortune, my Beloved came and embraced me. || 1 || O camel-like mind, meditate on the True Guru,
the Primal Being. || 1 || Pause || O camel-like mind, contemplate the Lord, and meditate on the Lord’s Name. When you
are called to answer for your account, the Lord Himself shall release you. || 2 || O camel-like mind, you were once very
pure; the filth of egotism has now attached itself to you. Your Beloved Husband is now manifest before you in your own home,
but you are separated from Him, and you suffer such pain! || 3 || O my beloved camel-like mind, search for the Lord within
your own heart. He cannot be found by any device; the Guru will show you the Lord within your heart. || 4 || O my beloved
camel-like mind, day and night, lovingly attune yourself to the Lord. Return to your own home, and find the palace of love;
meet the Guru, and meet the Lord. || 5 || 




No comments:

Post a Comment