-
Hi,
I would like to save the RMAN script as a command file and schedule the job to be done at night. Could someone give me some idea or a simple example? Thanks in advance.
-
Since you didn't post your OS and version, I am assuming Solaris and 8.1.7.2.
You can use cron to automatically kick off a script.
Inside your script, you will run rman from the command line similar to:
rman catalog rmanuser/rmanuser@rcvcat target / cmdfile=your_command.rman msglog=backup.out
[Edited by marist89 on 01-22-2002 at 04:38 PM]
Jeff Hunter
-
Thanx
Sam
Life is a journey, not a destination!
-
help with RMAN job scheduing
Thank you very much for responding. My OS is win2000 and the database server is 9i.
-
Go to Start --> Accessories --> System Tools --> Scheduled taskes
Create a new task and doble click on the task and that will bring up a detail window, there you specify the task that you want to run and the time frame at which it should be ran and etc.
Sam
Thanx
Sam
Life is a journey, not a destination!
-
Thanks Jeff and Sam. I solved the problem! I had tried to look for a solution for a while before I put my message on the web site. I am so glad that you guys help me out. In case of someone who has the same question as I did. I would like to share my experience with them. If there is anything incorrect, please feel free to correct me. The following are what I did:
1. Create RMAN script use Notepad and save the work as xxxxx.rman file. Example:
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
tag='tech_contrlfile';
backup archivelog all;
release channel c1;
sql 'alter database open';}
2 Create Command file that will run the xxxxx.rman file. example:
sqlplus/nolog @ startrmbkup.sql ----- (execute the startrmbkup.sql to shutdown the target database and restart it in mount mode in order to perform consistent full database backup.)
rman rcvcat rmanuser/rmanuserpwd@recatalogname target dbusername/password @ targetdbname cmdfile=mytest.rman ------ (mytest.rman is the file I created in step one)
3 Schedule your job at the Command Prompt with the ‘at’ command.
-
Here are few suggestions that I would like to contribut towards your script.
1. Make sure that you have enough disk space.
2. In the backupscript, include the option of deleting the archivelog files as they get backed up.
Code:
backup archivelog all
delete input;
3. Mention files per set option to the backup, such that your recovery would get speeded up
4. IF your database is of Enterprise, then you might want to think of adding more channels. On the other hand if it were to be of standard edition, then you can use only one channel at a time.
5. One other thing is that you can put them all in a script and then
call those scripts as
Code:
run { execute script script_name; }
6. Then the last but not the least, try a recovery and get your self accustomed to it with a recovery
7. Make sure that you periodically clean the backup both from the catelog and disk, based on your shop's backup policy.
Sam
Thanx
Sam
Life is a journey, not a destination!
-
Hi Sam,
Thank you very much for your suggestions. Your last suggestion is exactly what I am looking for but don’t know what to do yet. It would be greatly appreciated if you could give me some clue on how to clean up the backup file both from the recovery catalog and disk and how often should I do it. Thanks again.
-
Depending on your OS, check for the files:
$ORACLE_HOME/rdbms/demo/*.rcv
They have a number of sample scripts on how to do an RMAN, HOT/COLD, FULL/INCREMENTAL backup.
You may use that as your template to refine your code. IF you need any assistance, please feel free to let us know.
Sam
Thanx
Sam
Life is a journey, not a destination!
-
Tang
I'd like to use RMAN. Could you please send me any scripts you have including suggestions on how you went about setting it up.
Oracle 8.1.7 Win2K Advanced server, WinNT.
Thanks
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
|