Automatic daily backup of Oracle Database

Source: Internet
Author: User

Now let's introduce our project using the Exp tool to automatically back up Oracle every day.

With this tool we can also use the command line to export using PL/SQL developer.

We want to use the EXP command to export Oracle's data, first of all to ensure that our local computer installed Oracle database software, That is: the Exp.exe command to install the Oracle server together with our system, if our system does not have an Oracle server installed and copied from other places of this exp.exe, generally cannot be performed. Such as:

We enter exp in the cmd window, displaying the following information indicating that the EXP command can be used.

Script for. bat Batch: Name: Yujkdbpro.bat

@echo off

echo Delete the spare files and logs from 10 days ago

forfiles/p "D:\oracle-bak"/M *.dmp/d -10/c "cmd/c del @path"

forfiles/p "D:\oracle-bak"/M *.log/d -10/c "cmd/c del @path"

Echo is backing up the Oracle database, please wait a moment ...

Exp Yujk/[email PROTECTED]:1521/YUJKDB file=d:\oracle-bak\yujkdbpro%date:~0,4%%date:~5,2%%date:~8,2%.dmp log=D:\ Oracle-bak\yujkdbpro%date:~0,4%%date:~5,2%%date:~8,2%.log OWNER=YUJK buffer=65535

The echo task is complete!

The last generated backup file and log file is as follows:

Here we need to add this Yujkdbpro.bat batch script to the window's timed task, implementing the script every day to implement the backup. Can self-Baidu a bit.

Reference Links:

76064334

53635602/

52410516

Automatic daily backup of Oracle database

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.