Selasa, 04 November 2008

Rman to windows

Þ sqlplus rman/rman@RMAN (check -> select * from db;) (note down DBID)
Þ Set oracle_sid for target database
$) ORACLE_SID=LTTEST; export $ORACLE_SID

Þ Shutdown target database
$) shutdown immediate

Þ Run script to take backup
$) rman target=sys/change_on_install@LTTEST catalog rman/rman@RMAN
RMAN> run {
2> allocate channel c1 type disk format ‘/ltbdata5/rman/rman_databkup/bck_%n_%s_%p’;
3> backup database filesperset 3; (backup full database filesperset 3;)
4> release channel c1;
5> }
RMAN> list backup
( above RMAN backup contains full database backup in NOARCHIVELOG mode)


(Following steps must run in RMAN> prompt)

ü Connecting to the target database (e.g. – LTTEST)
e.g. –
RMAN> CONNECT TARGET sys/change_on_install@LTTEST;
(this step should have system privilage)
ü Creating catalog file
e.g. –
RMAN> CONNECT CATALOG /@;
RMAN> CREATE CATALOG TABLESPACE ;
RMAN> exit

Þ Connecting to the target database
e.g. –
$) rman target=sys/change_on_install@LTTEST catalog rman/rman@RMAN
$) register database (use only first time to register target database in catalog)
$) exit

Þ sqlplus rman/rman@RMAN (check -> select * from db;) (note down DBID)
Þ Set oracle_sid for target database
$) ORACLE_SID=LTTEST; export $ORACLE_SID

Þ Shutdown target database
$) shutdown immediate

Þ Run script to take backup
$) rman target=sys/change_on_install@LTTEST catalog rman/rman@RMAN
RMAN> run {
2> allocate channel c1 type disk format ‘/ltbdata5/rman/rman_databkup/bck_%n_%s_%p’;
3> backup database filesperset 3; (backup full database filesperset 3;)
4> release channel c1;
5> }
RMAN> list backup
( above RMAN backup contains full database backup in NOARCHIVELOG mode)
RESTORING A DATABASE TO A PREVIOUS INCARNATION

Tidak ada komentar: