Saturday, September 7, 2013

Database Backups Oracle Recovery through RMAN --------------------DB Backups Part 2

Here is the recovery from RMAN Side. it is as simple as from RMAN side now the big deal how we are going to work with this tool using backup software's, as we all know any integrated backup works through a API to backup in a flexible method.

So when ever we are going deal with any Specific backup we need to know few use full parameters like control file, catalogue, sfile, restore , recover, database, mount, open ,sysadm, etc, etc.


C:\Documents and Settings\Administrator>rman target sys/XXX@dporacle nocatalog
Recovery Manager: Release 8.1.5.0.0 - Production
RMAN-06005: connected to target database: DPORACLE (DBID=2406364181)
RMAN-06009: using target database controlfile instead of recovery catalog
RMAN> run {
2>  allocate channel t1 type disk;
3> RESTORE DATABASE;
4> }
RMAN-03022: compiling command: allocate
RMAN-03023: executing command: allocate
RMAN-08030: allocated channel: t1
RMAN-08500: channel t1: sid=11 devtype=DISK
RMAN-03022: compiling command: restore
RMAN-03022: compiling command: IRESTORE
RMAN-03023: executing command: IRESTORE
RMAN-08016: channel t1: starting datafile backupset restore
RMAN-08502: set_count=1 set_stamp=825458721 creation_time=06-SEP-13
RMAN-08089: channel t1: specifying datafile(s) to restore from backup set
RMAN-08523: restoring datafile 00001 to F:\ORACLE\ORADATA\DPORACLE\SYSTEM01.DBF
RMAN-08523: restoring datafile 00002 to F:\ORACLE\ORADATA\DPORACLE\USERS01.DBF
RMAN-08523: restoring datafile 00003 to F:\ORACLE\ORADATA\DPORACLE\RBS01.DBF
RMAN-08523: restoring datafile 00004 to F:\ORACLE\ORADATA\DPORACLE\TEMP01.DBF
RMAN-08523: restoring datafile 00005 to F:\ORACLE\ORADATA\DPORACLE\OEMREP01.DBF
RMAN-08523: restoring datafile 00006 to F:\ORACLE\ORADATA\DPORACLE\INDX01.DBF
RMAN-08023: channel t1: restored backup piece 1
RMAN-08511: piece handle=F:\BACKUP\DPORACLE_T825458721_S1_P1 params=NULL
RMAN-08024: channel t1: restore complete
RMAN-08031: released channel: t1


RMAN> run {
2> RECOVER DATABASE;
3> }
RMAN-03022: compiling command: recover
RMAN-03022: compiling command: recover(1)
RMAN-03022: compiling command: recover(2)
RMAN-03022: compiling command: recover(3)
RMAN-03023: executing command: recover(3)
RMAN-08054: starting media recovery
RMAN-08055: media recovery complete
RMAN-03022: compiling command: recover(4)


RMAN> ALTER DATABASE OPEN;
RMAN-06400: database opened
RMAN>

Sunday, September 1, 2013

Database Backups Series - Part 1

Most challenging area for any backup tool administrator is Database backups.
Here we are going to discuss most of the database backups like oracle, sql,db2,sap,exchange  starting with oracle I am going to post my understandings on DB backups .

Example of simple rman cold backup in oracle DB:

SQL> CONNECT sys AS SYSDBA

SQL> STARTUP MOUNT;
ORACLE instance started.
Total System Global Area  1.007E+09 bytes
Fixed Size                    65484 bytes
Variable Size              86917120 bytes
Database Buffers          919568384 bytes
Redo Buffers                  73728 bytes
Database mounted.
SQL>


C:\Documents and Settings\Administrator>rman target sys/xxxxx@dporacle nocatalo
g
Recovery Manager: Release 8.1.5.0.0 - Production
RMAN-06005: connected to target database: DPORACLE (DBID=2406364181)
RMAN-06009: using target database controlfile instead of recovery catalog


RMAN> run {
2>   allocate channel t1 type disk;
3>   backup
4>     format '%d_t%t_s%s_p%p'
5>       (database);
6>    release channel t1;
7> }
RMAN-03022: compiling command: allocate
RMAN-03023: executing command: allocate
RMAN-08030: allocated channel: t1
RMAN-08500: channel t1: sid=12 devtype=DISK
RMAN-03022: compiling command: backup
RMAN-03023: executing command: backup
RMAN-08008: channel t1: starting full datafile backupset
RMAN-08502: set_count=2 set_stamp=824918367 creation_time=31-AUG-13
RMAN-08010: channel t1: specifying datafile(s) in backupset
RMAN-08522: input datafile fno=00001 name=F:\ORACLE\ORADATA\DPORACLE\SYSTEM01.DB
F
RMAN-08011: including current controlfile in backupset
RMAN-08522: input datafile fno=00003 name=F:\ORACLE\ORADATA\DPORACLE\RBS01.DBF
RMAN-08522: input datafile fno=00005 name=F:\ORACLE\ORADATA\DPORACLE\OEMREP01.DB
F
RMAN-08522: input datafile fno=00002 name=F:\ORACLE\ORADATA\DPORACLE\USERS01.DBF
RMAN-08522: input datafile fno=00004 name=F:\ORACLE\ORADATA\DPORACLE\TEMP01.DBF
RMAN-08522: input datafile fno=00006 name=F:\ORACLE\ORADATA\DPORACLE\INDX01.DBF
RMAN-08013: channel t1: piece 1 created
RMAN-08503: piece handle=DPORACLE_T824918367_S2_P1 comment=NONE
RMAN-08525: backup set complete, elapsed time: 00:01:10
RMAN-03022: compiling command: release
RMAN-03023: executing command: release
RMAN-08031: released channel: t1
RMAN> list backup;
RMAN-03022: compiling command: list
List of Backup Sets
Key     Recid      Stamp      LV Set Stamp  Set Count  Completion Time
------- ---------- ---------- -- ---------- ---------- ----------------------
1       1          824918432  0  824918367  2          31-AUG-13
    List of Backup Pieces
    Key     Pc# Cp# Status      Completion Time        Piece Name
    ------- --- --- ----------- ---------------------- ------------------------
    1       1   1   AVAILABLE   31-AUG-13              DPORACLE_T824918367_S2_P1

    List of Datafiles Included
    File Name                                  LV Type Ckp SCN    Ckp Time
    ---- ------------------------------------- -- ---- ---------- -------------
    1    F:\ORACLE\ORADATA\DPORACLE\SYSTEM01.DBF 0  Full 138066     31-AUG-13
    2    F:\ORACLE\ORADATA\DPORACLE\USERS01.DBF 0  Full 138066     31-AUG-13
    3    F:\ORACLE\ORADATA\DPORACLE\RBS01.DBF  0  Full 138066     31-AUG-13
    4    F:\ORACLE\ORADATA\DPORACLE\TEMP01.DBF 0  Full 138066     31-AUG-13
    5    F:\ORACLE\ORADATA\DPORACLE\OEMREP01.DBF 0  Full 138066     31-AUG-13
    6    F:\ORACLE\ORADATA\DPORACLE\INDX01.DBF 0  Full 138066     31-AUG-13
RMAN>

Total Pageviews