SQLCMD.exe

# query in command line sqlcmd -d db_name -Q ‘select * from table_name’ -W   # connnect by hostname and port number (1433) sqlcmd -S tcp:hostname,1433 -U username -P password   # connnect by hostname and port number (1433) and use db (dbname) sqlcmd -S tcp:hostname,1433 -U username -P password -d dbname   # input Read more about SQLCMD.exe[…]

SQL Server: Numer portu

Wykonanie poniższego zapytania powinno zwrócić numery portów, na których nasłuchuje SQL Server. USE master GO xp_readerrorlog 0, 1, N’Server is listening on’, ‘any’, NULL, NULL, N’asc’ GOUSE master GO xp_readerrorlog 0, 1, N’Server is listening on’, ‘any’, NULL, NULL, N’asc’ GO