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# 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 Read more about SQLCMD.exe[…]