Connecting to SQL Server Using SQLCMD Utility

Connecting to SQL Server Using SQLCMD Utility

Problem

One of the junior SQL Server Database Administrators in my company asked me how he can connect to SQL Server Database Engine using the SQLCMD utility. In this tip I show how to connect to a SQL Server Database Engine using the SQLCMD utility with Windows Authentication and SQL Server Authentication.
Solution

Using the SQLCMD utility you can execute Transact-SQL statements, stored procedures or any other SQL commands from a command prompt instead of having to launch SSMS or some other GUI. This is a very effective utility available to SQL Server Database Administrators or Developers to run Simple or Ad-Hoc queries against a SQL Server database instance.

N41 by Nouvolution

Popular posts from this blog

PowerBuilder Q & A, August 2009

5.1.2 - Bad destination host 'DNS Hard Error looking up