You need to back up the Oracle database automatically on a regular basis and want to use the simplest tools and methods.
Timing: Use the scheduled tasks that come with windows to complete.
Backup: Use the Oracle export tool export. The command line is exp, and the command to view help is> exp-help
You need to write a script to execute the exp command, and call the script to run it on a scheduled task.
Oracle_backup.vbs
Option Explicit
On Error Resume Next
Dim Fname, cmd
Dim Wshshell
Set Wshshell = Createobject ( " Wscript. Shell " )
Fname = Date & " _ " & Hour ( Now ) & " _ " & Minute ( Now ) & " _ " & Second ( Now )
CMD = " Exp log = ../backup/ " & Fname & " _ Oracle_bak.log file = ../backup/ " & Fname &
" _ Oracle_bak.dmp parfile1_exp.txt"
Wshshell. Run cmd
Set Wshshell = Nothing
Exp.txt configuration file content:
Userid = username/password @ Database
Owner = Scott
Indexes = y
Grants = y
Rows = y
Constraints = y
Compress = N
Configuration File description:
The main modification parameters are:
Userid = username/password @ Database
: This is to use the user to back up the database and specify the connected database. Here, the username user is used to back up the database, and the password is password,
The database to be backed up is the database. This part must be changed.
Owner = SCOTT: user to be backed up. In this example, the Scott user is backed up. To back up multiple users, separate them with commas. This part must be changed. For example, if you back up Scott and system users, 'owner = Scott, system '.
If you are familiar with the exp backup tool, you can use this other parameter. You can also add other parameters to the exp.txt file.