Created
March 10, 2010 19:39
-
-
Save PJensen/328256 to your computer and use it in GitHub Desktop.
This file contains 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 | |
REM The following applies trigger patches to the selected database using | |
REM a preset username catalog and password. | |
ECHO Setting db connection information | |
SET dbUser=[[UserNameHere]] | |
SET dbCatalog=[[CatalogNameHere] | |
SET dbServer=[[ServerNameHere] | |
ECHO *** | |
ECHO Server: %dbServer% | |
ECHO Catalog: %dbCatalog% | |
ECHO User: %dbUser% | |
ECHO *** | |
ECHO *** SQL files to execute. | |
ECHO *** | |
FOR %%c in (*.sql) DO echo %%c | |
ECHO * Enter 1 to quit and 2 to continue. | |
CHOICE /C:12 | |
IF ERRORLEVEL 2 GOTO GO | |
IF ERRORLEVEL 1 GOTO QUIT | |
:GO | |
FOR %%c in (*.sql) DO OSQL -S %dbServer% -U %dbUser% -d %dbCatalog% -i %%c < password_input.pw | |
:QUIT | |
PAUSE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment