Batch Processing of Oracle backup and recovery

Source: Internet
Author: User

===================== Backup ==================================== ============
RMAN target/audit file =/Oracle/Shell/CFG/bakdb. RCV trace/Oracle/Shell/logs/bakfull. log &

Configure device type disk parallelism 8;
Configure Channel 1 device type disk format'/rman01/bak_ful/DBF _ % T _ % S _ % P' maxpiecesize 8g;
Configure Channel 2 device type disk format'/rman02/bak_ful/DBF _ % T _ % S _ % P' maxpiecesize 8g;
Configure Channel 3 device type disk format'/rman03/bak_ful/DBF _ % T _ % S _ % P' maxpiecesize 8g;
Configure Channel 4 device type disk format'/rman04/bak_ful/DBF _ % T _ % S _ % P' maxpiecesize 8g;
Configure Channel 5 device type disk format'/rman05/bak_ful/DBF _ % T _ % S _ % P' maxpiecesize 8g;
Configure Channel 6 device type disk format'/rman06/bak_ful/DBF _ % T _ % S _ % P' maxpiecesize 8g;
Configure Channel 7 device type disk format'/rman07/bak_ful/DBF _ % T _ % S _ % P' maxpiecesize 8g;
Configure Channel 8 device type disk format'/rman08/bak_ful/DBF _ % T _ % S _ % P' maxpiecesize 8g;
Run
{
SQL "alter system archive log current ";
Backup filesperset = 32 Database Plus archivelog format '/rman02/arch _ % d _ % T _ % s ';
SQL "alter Database Backup controlfile to''/rman01/controlfile/copy_current_controlfile ''reuse ";
}
========================== Restore ================================ ============
RMAN target/nocatalog export file =./restoredb. RCV trace./restoredb. log &

---------------- Restoredb. RCV ----------------------------------------------
Startup nomount;
Set dbid 3658411712; # required when restoring control file in nocatalog Mode
Run
{
Configure device type disk parallelism 8;
Configure Channel 1 device type disk format'/rman01/bak_ful/DBF _ % T _ % S _ % P' maxpiecesize 8g;
Configure Channel 2 device type disk format'/rman02/bak_ful/DBF _ % T _ % S _ % P' maxpiecesize 8g;
Configure Channel 3 device type disk format'/rman03/bak_ful/DBF _ % T _ % S _ % P' maxpiecesize 8g;
Configure Channel 4 device type disk format'/rman04/bak_ful/DBF _ % T _ % S _ % P' maxpiecesize 8g;
Configure Channel 5 device type disk format'/rman05/bak_ful/DBF _ % T _ % S _ % P' maxpiecesize 8g;
Configure Channel 6 device type disk format'/rman06/bak_ful/DBF _ % T _ % S _ % P' maxpiecesize 8g;
Configure Channel 7 device type disk format'/rman07/bak_ful/DBF _ % T _ % S _ % P' maxpiecesize 8g;
Configure Channel 8 device type disk format'/rman08/bak_ful/DBF _ % T _ % S _ % P' maxpiecesize 8g;
Restore controlfile from '/rman01/controlfile/copy_current_controlfile ';
Alter database Mount;
Restore database;
Recover database until cancel;
}

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.