RMAN backup script in Windows

Source: Internet
Author: User

 

 

The RMAN backup script in Windows is relatively simple. Let's look at the content.

 

1.ModifyRMANRelated Parameters

RMAN> show all;

RMAN> Configure controlfile autobackup on;

RMAN> Configure controlfile autobackup format for device type disk to 'd:/backup/% F ';

RMAN> exit;

After setting the parameters as above, the control file and spfile will be automatically backed up to D:/backup along with the database backup;

 

 

2.Backup script

 

The content of rmanbackup.txt is as follows:

 

Run {

Allocate channel C1 type disk;

Backup database format 'd:/hotback/DB _ % U' plus archivelog delete all input format 'd:/hotback/arch _ % U ';

Release Channel C1;

}

Exit

 

 

The rmanbackup. BAT file contains the following content:

 

RMAN target sys/admin @ DBA nocatalog cmdfile 'd:/rmanbackup.txt'

Log 'd:/rman_backup _ % Date :~ 0, 4% % Date :~ 5, 2% % Date :~ 8, 2% ". Log'

 

Add the rmanbackup. BAT file to the scheduled task for regular execution. After the backup is complete, a log file in the format of rman_backup_20100112.log is generated in the same directory.

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.