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.