Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
@echo off set TmpFile=D:\data_extract\counterval.txt sqlcmd -E -S servername\instance,port -d batch_stuff-Q"SET NOCOUNT ON; SELECT REPLACE(LTRIM(CounterValue),' ','') FROM batch_stuff..Counters WHERE CounterID = 1" -b -w 10 -h-1 -o "%TmpFile%" set InFile1=D:\data_extract\get_data.sql set InFile2=D:\data_extract\update_counter.sql set OutFile=D:\data_extract\data\BGM01_ set CurrDate=%date:~-4,4%%date:~-7,2%%date:~-10,2% set CurrTime=%time:~0,2%%time:~3,2%%time:~6,2%%time:~9,2% set OsqlParams1=-E -S servername\instance,port -d database -h-1 -n -w30 -i set OsqlParams2=-E -S servername\instance,port -d batch_stuff -h-1 -n -w30 -i if not exist "%TmpFile%" ( echo %TmpFile% not found. echo Press any key to quit ... pause > nul goto :EOF ) if not exist "%InFile%" ( echo %InFile% not found. echo Press any key to quit ... pause > nul goto :EOF ) for /f "tokens=*" %%A in ('type %TmpFile%') do set counter=%%A sqlcmd %OsqlParams1% "%InFile1%" -o "%OutFile%_D%CurrDate%_T%CurrTime%_0%counter%" sqlcmd %OsqlParams2% "%InFile2%"