Oracle regular Database Backup

Source: Internet
Author: User

I have encountered Oracle backup and restoration problems recently. I have always done some repetitive work. Do you have a permanent solution? Nothing can be done, just unexpected. Previously, we used scripts to perform backup and restoration, that is, exp and IMP command operators. In addition, I repeatedly typed commands in the DOS window, so I wrote a BAT file and added it to the Job Scheduling in the operating system, that is, the scheduled task, let the operating system regularly execute the configured BAT file, which achieves the objective of Regularly backing up the Oracle database automatically, if you are an advanced dBAArticleYou can skip this step.

1. Write a BAT file.

Assume that the Oracle database instance is named oracle_beijing, the username created is user1, And the password is 123456. The file to be backed up is stored in the C root directory. The backup file name is oracle_beijing_user1. Open notepad and enter the following command. Command set: EXP user1/123456 @ oracle_beijing file = C:/oracle_beijing_user1.dmp owner = (user1) or exp system/manager @ oracle_beijing file = C:/oracle_beijing_user1.dmp owner = (user1) in this case, the backup file name is written to death. Can I use the backup date as the file name? The answer is yes! Command set: EXP user1/123456 @ oracle_beijing file = C:/% Date :~ 0, 4% % Date :~ 5, 2% % Date :~ 8, 2%. dmp owner = (user1) or exp system/manager @ oracle_beijing file = C:/% Date :~ 0, 4% % Date :~ 5, 2% % Date :~ 8, 2%. dmp owner = (user1) Save this file as a bat file, if the file name is autobackuporacledatabase. bat

2. Add a scheduled task to the Operating System (win2003 server. Call this autobackuporacledatabase. BAT file.

Control Panel --> scheduled task --> Add scheduled task. Now, I believe all the friends who read this article will understand it. I will not detail it below.

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.