|
-
1.create a file in notepad similar to :
run {allocate channel c1 type disk;
backup database
tag ='rman_offline_backup'
format '\oracle\orabkup\tech\rmbkup\db_t%t_s%s_p%p'
(database);
backup current controlfile
create a file in notepad that similar to :
tag='tech_contrlfile';
backup archivelog all delete input;
release channel c1;
sql 'alter database open';}
save this file with rman extension xxxxx.rman.
2.create another file in notepad similar to:
connect system/password@connectstringtotargetdabase as sysdba
shutdown immediate
startup mount
exit;
save this file with the sql extension xxxxx.sql
this file shutdown the target database and restart the instance in mount mode
3.again in notepad create the command file that connects to target database and recovery catalog and runs the two files above. Code similar to
sqlplus/nolog @xxxxx.sql(file created in the second step)
rman rcvcat rmanuser/rmanuserpwd@connectstringtorecoverycatalog target dbusername/password @ connectstringtotargetdatabase cmdfile = xxxxx.rman(file created in the first step)
save this file with the batch file extension xxxxx.bat
4. double click the file created in the step 3, it will do all the job for you. You can also schedule the job to be done at anytime using the windows ‘at’ command. I hope this helps.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|