Oracle backup in windows

Source: Internet
Author: User

There are many Oracle backup methods. The following describes the oracle backup methods in windows. If you are interested in Oracle backup, take a look.

The oracle backup is named rman backup, so that you can perform full backup and Incremental backup. You can use the task plan to set backup policies. For example, you can perform level 0 backup every Monday, perform Level 1 backup from Tuesday to Sunday. Note that the archive log mode must be enabled when rman is used for backup.

1. Create a level 0 backup batch file backup_0.bat with the following content:

 
 
  1. set oracle_sid=oaserver 
  2. rman target /  msglog c:\logs\%date:~0,10%.log cmdfile=oaserver_backup_0.txt 

Create the backup_0.txt file of the responsible oracle_region after 2XX, the content is as follows:

 
 
  1. run{  
  2. allocate channel 'd1' type disk;  
  3. allocate channel 'd2' type disk;  
  4. allocate channel 'd3' type disk;  
  5. allocate channel 'd4' type disk;  
  6. backup incremental level 0 cumulative tag 'db0' format 'E:\oaserver\backup\db0%u_%s_%p' database;  
  7. sql 'alter system archive log current';  
  8. backup filesperset 4 archivelog all delete input;  
  9. delete noprompt obsolete;  
  10. release channel d1;  
  11. release channel d2;  
  12. release channel d3;  
  13. release channel d4;  
  14. }  
  15. list backup;  
  16. crosscheck backup;  
  17. delete noprompt expired backup;  
  18. delete noprompt obsolete;  
  19. exit;  
  20. EOF  
  21. echo "-------------------------end------------------------------";date  

3. Add a task scheduler. Use the task scheduler Wizard to set the time frequency for automatic task execution based on the Oracle backup policy, for example, every day. Execute backup_0.bat.

4. Create a batch file backup_1.bat for level 1 backup (Incremental Backup). The content is as follows:

 
 
  1. set oracle_sid=oaserver 
  2. rman target /  msglog c:\logs\%date:~0,10%.log cmdfile=oaserver_backup_1.txt 

5. After creating the file backup_1.txt, the content is as follows:

 
 
  1. run{  
  2. allocate channel 'd1' type disk;  
  3. allocate channel 'd2' type disk;  
  4. allocate channel 'd3' type disk;  
  5. allocate channel 'd4' type disk;  
  6. backup incremental level 1 cumulative tag 'db1' format 'E:\oaserver\backup\db1%u_%s_%p' database;  
  7. sql 'alter system archive log current';  
  8. backup filesperset 4 archivelog all delete input;  
  9. delete noprompt obsolete;  
  10. release channel d1;  
  11. release channel d2;  
  12. release channel d3;  
  13. release channel d4;  
  14. }  
  15. list backup;  
  16. crosscheck backup;  
  17. delete noprompt expired backup;  
  18. delete noprompt obsolete;  
  19. exit;  
  20. EOF  
  21. echo "-------------------------end------------------------------";date 

6. Add a task scheduler. Use the task scheduler Wizard to set the time frequency for automatic task execution based on the backup policy, for example, every day. Execute backup_1.bat.

Oracle control file recovery

Oracle single row date functions

Introduction to Oracle bitand () Functions

This section describes the types of oracle grouping functions.

Use of oracle Aggregate functions

Related Article

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.