Take the initiative to back up the database into the DMP format of the Bat notation under window

Source: Internet
Author: User

Copy the following command to a TXT text document, and then change the corresponding number of parameters to the required number of parameters, after all, save the file in the bat format.
This will only need to double-click the bat file every time you need to back up. None of the rest of you, you just need to wait quietly ...
</pre><pre code_snippet_id= "494366" snippet_file_name= "blog_20141023_4_5799611" name= "code" class= "plain" >
The following commands can be copied directly using the
@echo off Echo starts REM ########################################################### REM # Windows Server 2003 under Oracle database own master Backup Batch script REM ########################################################### REM takes the current system time, may be different depending on the operating system value set curdate=% Date:~0,4%%date:~5,2%%date:~8,2%set Curmon=%date:~0,4%%date:~5,2%set Curtime=%time:~0,2%rem hours assuming less than 10, then 0 if "% in front of Curtime% "= =" 0 "set curtime=00if"%curtime% "= =" 1 "Set curtime=01if"%curtime% "= =" 2 "Set curtime=02if"%curtime% "= =" 3 "s ET curtime=03if "%curtime%" = = "4" Set curtime=04if "%curtime%" = = "5" Set curtime=05if "%curtime%" = = "6" Set Curtime=06if " %curtime% "= =" 7 "Set curtime=07if"%curtime% "= =" 8 "Set curtime=08if"%curtime% "= =" 9 "Set Curtime=09set curtime=%curtime% %time:~3,2%%time:~6,2%rem set all, username, and password set owner=xxx (write your database service name here) set User=xxx (a corresponding user of the database you want to back up) set Password=xxx (corresponding PASSWORD) REM create a backup folder.           Folder structure is oraclebak/yyyymmdd/if not exist ' Oraclebak ' mkdir oraclebakcd oraclebakif not exist "%curmon%" MkDir%curmon%set filename=%curmon%/%user%_%curdate%_%curtime%. DMP set Explog=%curmon%/%user%_%curdate%_%curtime%_log.log REM calls Oracle's EXP command to export user data exp%user%/%password%@%owner%     File=%filename% log=%explog% owner=%user% Grants=n

Take the initiative to back up the database into the DMP format of the Bat notation under window

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.