AnP/Tools/sqlserver.install.bat
2026-07-11 10:47:39 +02:00

22 lines
537 B
Batchfile

@echo off
set "transact_sql_host=127.0.0.1"
set "transact_sql_port=1433"
set "transact_sql_user=sa"
set "transact_sql_password="
if exist Secrets.cmd (
call Secrets.cmd
)
where sqlcmd > NUL
if %errorlevel% neq 0 (
echo "Please, install 'sqlcmd' for use the Scripts via CMD."
) else (
for /D %%d in (%cd%\..\SQLServer\AnP.*) do (
for %%f in (%%d\*.sql) do (
echo %%f
sqlcmd -S %transact_sql_host%,%transact_sql_port% -U %transact_sql_user% -P %transact_sql_password% -i %%f
)
)
)