Thursday, March 26, 2009

Oracle 8.1.6 Recovery Manager (RMAN)

Overview
•Command-line and Enterprise Manager-based tool
•Optimize performance & space consumption
•Integrate with Oracle Secure Backup
•Free dependency on OS and SQL*Plus

Functional Components
•Target DB to be backed up
•RMAN client
•A flash recovery area (disk location)

Backup and restore on Windows (32bit)
•Run run_rman.bat (can be added to schedule tasks list)
•Log File (C:\Database_Migration\RMAN\ORCL81_.log

RMAN – Files
•Run_rman.bat – main batch script
•run_sql.txt: - sql script for backup controlfile to trace
•rman_cmf.txt: rman script for backup database and old archived logs
•run_bak_ctl.txt: sql script for backup controlfile
•restore_steps.txt:steps for restore whole database from backup files

Steps to run scripts
•Step1. delete old backup files.
•Step2. create controlfile trace file and then copy it to the backup folder
•Step3. rum rman backup scripts
•Step4. using winrar compress the backup files (if winrar is available)

Parameters to be modified
•paths in run_rman.bat, rman_cmf.txt, run_bak_ctl.txt
•NowDate, Month, Day definition in run_rman.bat according to your windows system.
•winrar in run_rman.bat. You may need add the path of winrar to system path or use absolute path

If Error ORA-19602 is encountered
•ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode
•C:\>SVRMGRL
•SVRMGR>connect internal
•SVRMGR>shutdown immediate
•SVRMGR>startup (if error, try ‘mount’)
•SVRMGR>alter database archivelog;

•SVRMGR>startup

Recover database
•Launch CMD screen (db is mount)
•C:>set oracle_sid=GEMSDB81
•C:>sqlplus /nolog
•SQL>connect / as sysdba

No comments:

Post a Comment