Home » Archive

Articles in the Backup Recovery Category

Administration, Backup Recovery, Oracle »

[23 Nov 2009 | No Comment | 653 views]

Your database has to be in archive log mode for this script to work.
Code:

RMAN> run {
2> # backup the database to disk
3> allocate channel d1 type disk;
4> backup
5> full
6> tag full_db
7> format ‘/backups/db_%t_%s_p%p’
8> (database);
9> release channel d1;
10> }

Administration, Backup Recovery, Oracle »

[23 Nov 2009 | No Comment | 629 views]

This script will backup all the datafiles using the RMAN utility reducing the cost of resources.
Code:
resync catalog;
run {
allocate channel c1 type disk;
copy datafile 1 to ‘C:\rman1.dbf’;
copy datafile 2 to ‘C:\rman2.dbf’;
copy datafile 3 to ‘C:\rman3.dbf’;
copy datafile 4 to ‘C:\rman4.dbf’;
copy datafile 5 to ‘C:\rman5.dbf’;
}
exit
echo exiting after successful hot backup using RMAN

Backup Recovery »

[23 Nov 2009 | No Comment | 2,537 views]

rman target sys/change_on_install nocatalog
  run {
     allocate channel t1 type disk;
     # set until time ‘Apr 17 2004 22:11:51′;
     restore tablespace user;
     recover tablespace user;
     release channel t1;
  }

Administration, Backup Recovery, Oracle »

[23 Nov 2009 | No Comment | 435 views]

This script will perform datafile recovery
Code:
RMAN> run {
2> allocate channel d1 type disk;
3> sql “alter tablespace users offline immediate”;
4> restore datafile 5;
5> recover datafile 5;
6> sql “alter tablespace users online”;
7> release channel d1;
8> }

Backup Recovery »

[23 Nov 2009 | No Comment | 283 views]

rman target sys/change_on_install nocatalog
  run { 
     allocate channel t1 type disk;
     backup 
        format ‘/backup/full_backup/%d_t%t_s%s_p%p’
            ( database 
            release channel t1;
}