

SET database=%1
SET server=%2
if "%3" == "NT" goto NTOptions
SET userflags=-U %4 -P %5
SET bcpflags=-U %4 -P %5
SET pathInfo=%6
goto start

:NTOptions
SET bcpflags=-T
SET userflags=-E


:start



@echo.
@echo. Creating Tables...
@echo.

osql -S %server% -d %database% -n -i sbwTable.sql %userflags% > %pathInfo%








@echo.
@echo. Alter Table...
@echo.
osql -S %server% -d %database% -n -i sbwAlertTable.sql %userflags% >> %pathInfo%




@echo.
@echo. Alter TableRelation...
@echo.
osql -S %server% -d %database% -n -i sbwRelation.sql %userflags% >> %pathInfo%


@echo.
@echo. SetData...
@echo.
osql -S %server% -d %database% -n -i sbwSetData.sql %userflags% >> %pathInfo%




@echo.
@echo. Creating Stored Procedures...
@echo.
osql -S %server% -d %database% -n -i sbwsprocs.sql %userflags% >> %pathInfo%



@echo.
@echo. Completed!
@echo.
