Summary of automatic backup scripts for Oracle databases in linux and windows

Source: Internet
Author: User

Oracle DatabaseIn operation, database backup is one of the most important operations because it involves database security. Database Administrators often set the databaseAutomatic BackupTo back up the database, how do I set automatic backup? What are the differences between the settings of different operating system platforms? This article mainly introduces this part of content, hoping to help you.

Backup of Oracle databases in Linux:

 
 
  1. FIELNAME=/home/oracle/dmp/`date +%Y%m%d`.dmp  
  2. echo $FIELNAME > /home/oracle/dmp/filename  
  3. /home/oracle/product/9.2/bin/exp ccbip/'und\=2008CN(Y|N)' full=y file=$FIELNAME  
  4. bzip2 $FIELNAME 

Note: All created files are in the Oracle user oinstall group.

Automatic backup script for Oracle databases in Windows:

ExpData. bat content:

 
 
  1. exp system/system@orcl file=c:\oracle_bak\tne%date:~4,10%.dmp owner=tne   
  2. exp system/system@orcl file=c:\oracle_bak\prt%date:~4,10%.dmp owner=prt   
  3. exp system/system@orcl file=c:\oracle_bak\sec%date:~4,10%.dmp owner=sec   
  4. exp system/system@orcl file=c:\oracle_bak\tea%date:~4,10%.dmp owner=tea   
  5. exp system/system@orcl file=c:\oracle_bak\pic%date:~4,10%.dmp owner=pic   
  6. exp system/system@orcl file=c:\oracle_bak\system%date:~4,10%.dmp owner=system   
  7. path=D:\WinRAR 3.20  
  8. rar a Data%date:~4,10%.rar *%date:~4,10%.dmp  
  9. del *%date:~4,10%.dmp 

The above is all the content of the script for automatic backup of Oracle databases in linux and windows. We will introduce it here. If you want to know more about Oracle databases, you can also take a look at this article: http://database.51cto.com/oracle/. I believe you can bring it to us!

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.