Use batch writing: database backup restore tool (third edition)

2010-11-26  来源:本站原创  分类:OS  人气:52 

This version of the menu options to enhance and correct judgments of

@echo off&setlocal enabledelayedexpansion color 0a
echo.=====================================
echo. Welcome to the Oracle database automatic backup restore utility
echo. Author : Qiao Lei  MSN:[email protected]
echo.=====================================
for /f "tokens=2 delims==" %%a in ('path') do (
         set "str=%%a"
         set str=!str: =+!
         for %%i in (!str!) do (
                 set "var=%%i"
                 set var=!var:+= !
                 echo !var!>>%temp%\change.txt
                 for /f "delims=" %%i in ('findstr "Db_1\bin" %temp%\change.txt') do set var=%%i
         )
)
set /p name= User name (username):
chcp 437 >nul
graftabl 936 >nul
>"%temp%\in.com" echo hP1X500P[PZBBBfh#b##[email protected]`$fPf]f3/f1/5++u5x
set /p= Please enter password :<nul
for /f "tokens=*" %%a in ('"%temp%\in.com"') do (
     set "password=%%a"
)
set /p sid= Space tab (SID):
:start
set /p choice=1. Exporting 2. import  3. Press any key to exit
if %choice% equ 1 (goto exp)
if %choice% equ 2 (goto imp) else (goto end)
:exp set /p file= Give the exported file a name :
set /p path= Storage path ( Remember lost colon :):
"%var%"\exp.exe %name%/%password%@%sid% file=%path%\%file% full=n
set /p choice=1. Continue to ( Enter c) 2. Press any key to exit
if %choice% equ c (goto start)
if %choice% equ e (goto end) else (goto end)
:imp
set /p file= Drag the database file you want to import into a form :
"%var%"\imp.exe %name%/%password%@%sid% file=%file% full=y
set /p choice=1. Continue to ( Enter c) 2. Press any key to exit
if %choice% equ c (goto start)
if %choice% equ e (goto end) else (goto end)
:end del /q %temp%\change.txt
del /q %temp%\in.com
exit

Code related

EQU equal
NEQ not equal
LSS less than
LEQ less than or equal
GTR greater than
GEQ greater than or equal
相关文章
  • Use batch writing: database backup restore tool (third edition) 2010-11-26

    This version of the menu options to enhance and correct judgments of @echo off&setlocal enabledelayedexpansion color 0a echo.===================================== echo. Welcome to the Oracle database automatic backup restore utility echo. Author : Qi

  • Using batch to write: database backup restore tool (an enhanced version of amendment) 2010-07-15

    This version of the previous version of the difference is: 1, support the password hidden input 2, can dynamically connect different oracle database 3, modified the previous program, the bug, better support for different host @echo off&setlocal enabl

  • Written by the batch: a database backup and restore tool (third edition) 2010-11-26

    This version of the menu options to enhance and amend the Judgement of @echo off&setlocal enabledelayedexpansion color 0a echo.===================================== echo. Welcome to the Oracle database automatic backup restore tool echo. Author : Joe

  • oracle database backup restore and backup recovery svn 2010-08-09

    Directory 2010-08-06 reinstall a system First, check the current status of the operating system resources necessary to back up 1 Second, the backup data 1 2.1 svn repository backup 1 2.2 oracle database backup 1 Third, re-install the operating system

  • sql server2005 database backup restore error 2010-04-06

    Phenomenon: a successful backup, restore when prompted - System. Data.SqlClient.SqlError: media set has 2 media clusters, but only provides one. All members must be provided. (Microsoft.SqlServer.Smo) Solution: backup, select backup target to ensure

  • Database backup, restore, 2010-07-28

    Backup database on SQL server Management Studio to back up, restore the database is very simple backup database stu to disk = 'E: \ hello.bak' Verify (back from the backup set contains the database and log files of a list of the result set. restore f

  • Oracle exp / imp command to import and export database backup (transfer) is more 2011-01-05

    Oracle data import and export imp / exp is equivalent to oracle data restore and backup. exp command to export the data from the remote database server to the local dmp file, imp command to import the dmp file to the distance from the local database

  • Oracle exp / imp command to import and export database backup (reproduced) 2011-04-02

    Oracle data import and export imp / exp is equivalent to oracle data restore and backup. exp command to export data from a remote database server to the local dmp file, imp command to import the dmp file to the distance from the local database server

  • SMO + PowerShell achieve SQLServer database backup and restore 2011-05-17

    Recently, demand, need to use the script / command line in the form of implementation of the database backup and restore! Try several times, and that depressed ah! So few examples of the Internet, most of them and can not run, it is silent people, ge

  • MySQL commonly used database backup and restore commands 2010-03-03

    MySQL database backup command mysqldump-hhostname-uusername-ppassword databasename> backupfile.sql Backup MySQL database table with the format <br /> delete backup deleted MySQL database table with the format, allowing the backup coverage without

  • Sql Server 2000 database backup file to restore 2010-03-17

    SQL Server 2000 database backup file to restore 1, open Sql server 2000 database, right on the label in the database, select - "All Tasks -" Restore Database 2, pop-up dialog box to restore database (1) in the "General" tab "to re

  • oralce Database Backup and Restore 2010-03-30

    1, database backup operation, type cmd in the Start into the dos command window, Then enter the appropriate backup command can be, Command: exp username / password @ global database name file = 'file path + file name' owner = (user name) For example:

  • MySQL database backup and restore of the commonly used commands 2010-04-06

    MySQL database backup command mysqldump-hhostname-uusername-ppassword databasename> backupfile.sql Backup MySQL database table with the format <br /> delete backup deleted MySQL database table with the format, allowing the backup coverage without

  • mysqldump database backup and restore, sql file import and export Xiangjie 2010-04-07

    mysqldump backup restore mysqldump import and export statements Daquan Xiangjie mysqldump backup: mysqldump-u username-p password-h host database, a-w "sql conditions" - lock-all-tables> path Case: mysqldump-uroot-p1234-hlocalhost db1 a-w &qu

  • MySQL database backup batch command BAT 2010-04-08

    This carried over http://www.jb51.net/article/19296.htm MySQL data backup tools may have a lot in this I'm going to share with you through the DOS batch commands and MySQL, WinRAR command to back up the work. Work environment Windows Server 2003, MyS

  • Use ssh command to restore mysql database backup 2010-05-08

    Login shell, you can also manage access to mysql database server mysql database directly. mysql-u username-ppassword-h hostname databasename Note: The above username that the user name, password means your password, hostname refers to the server host

  • MYSQL database backup and restore common statement 2010-07-12

    MySQL database backup command, you can add options to select different parameters to achieve the requirements of different formats. mysqldump-h host-u username-p password database name> file Backup MySQL database to delete the table with the format,

  • Oracle Database Backup and Restore (Export, Import) 2010-07-29

    Oracle Database Backup (export) steps: 1. Oracle database export using the command exp username / password @ oracledatabase, three parameters are user name, password and database 2. Export file: EXPDAT.DMP> c: \ data.dmp Select the file in the data p

  • mysql database backup and restore commands 2010-10-13

    mysql backup database command with cmd command first open a command window and enter the appropriate command A remote database backup mysqldump-u root-p [Password]-h [hostIp] databaseName> c: / backup.sql 2 local database backup mysqldump-u root-p [P

  • Oracle database backup and restore 2010-11-01

    Oracle database backup and restore specific annex