Automatic oracle Database Backup

Source: Internet
Author: User

In Windows, Oracle backs up data every night through EXP and retains the backup data for ten days.

1. Create the backup script oraclebackup. bat

Contents:

@ Echo off
Echo deletes the backup file and log 10 days ago.

Forfiles/p "E: \ oraclebackup"/dmp/OA *. dmp/d-10/c "cmd/c del @ path"
Forfiles/p "E: \ oraclebackup"/dmp/OA *. log/d-10/c "cmd/c del @ path"

Echo is backing up the Oracle database. Please wait ......
Exp user/password @ orcl file = E:/oraclebackup/dmp/OA _ % date :~ 0, 4% % date :~ 5, 2% % date :~ 8, 2%. dmp log = E:/oraclebackup/log/OA _ % date :~ 0, 4% % date :~ 5, 2% % date :~ 8, 2%. log owner = (jasoa_doc)
Echo task completed!

After that, change the txt extension of the notepad to bat.

Double-click oraclebackup. bat to test whether the backup is normal.

2. Create a scheduled task

Go to the control panel of windows, open the plan and task, create a task, Click Browse, and select the oraclebackup. bat file under the oraclebackup directory of the newly created edisk. Set the automatic execution time to save;

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.