REM ******************************************************************
REM ** Batch File : Database_Desing_Procedures.Bat
REM ** Purpose : This batch file is used to deploy all the sql Procedures into the specified database
REM ** Author : Vasanth Thangasamy
REM ** Written Date: 17-Apr-2007
REM ** Version : 1.0
REM ******************************************************************
@echo off
setlocal
dir/b /on *.sql >tmp.lst
REM ******************************************************************
REM *** Put your Server name, Database name and login credential ***
set ServerName=HCL-SV74QJMEZMB\SQLEXPRESS
set DataBaseName=Universal
set Login=sa
set Password=DigitalServer
REM ******************************************************************
MD C:\DBLongs\Universal
set Connection=Sqlcmd -S %ServerName% -E -d %DataBaseName%
for /F %%i in (tmp.lst) do %Connection% -i %%i -o C:\DBLongs\Universal\%%i%.txt
endlocal
goto :eof