Created
November 29, 2012 00:30
-
-
Save nkostic/4165839 to your computer and use it in GitHub Desktop.
MSSQL Database Insatance Backup BAT part
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ECHO OFF | |
CLS | |
:MENU | |
ECHO. | |
ECHO ............................................... | |
ECHO SELECT SERVER or 0 to EXIT. | |
ECHO ............................................... | |
ECHO. | |
ECHO 1 - BACKUP INSTANCE SERVERNAME\INSTANCENAME | |
ECHO 0 - EXIT | |
ECHO. | |
SET /P M=Type 1 or 0, then press ENTER: | |
IF %M%==1 GOTO INSTANCENAME | |
IF %M%==0 GOTO EOF | |
ECHO Wrong value | |
GOTO MENU | |
:INSTANCENAME | |
osql -E -S SERVERNAME\INSTANCENAME -i mssql_db_backup.sql | |
GOTO MENU | |
ECHO Presed 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Change SERVERNAME and INSTANCENAME to match your own.