Pricing  Get Quote
 
 
 

How to test SQL server connection?

To enter Transact-SQL statements, system procedures, and script files at the command prompt, use the sqlcmd Utility. You can enter it in Query Editor in SQLCMD mode, in a Windows script file or in an operating system (Cmd.exe) job.

Start the sqlcmd utility and connect to a default instance of SQL Server

  1. Go to the command prompt window (Run→cmd)
  2. Enter sqlcmd and press enter.
  3. You now have a trusted connection to the default instance of SQL Server that is running on your computer.
    1→ is the sqlcmd prompt that specifies the line number. Each time you press ENTER, the number increases by one.
  4. To end the sqlcmd session, type EXIT at the sqlcmd prompt.

Start the sqlcmd utility and connect to a named instance of SQL Server

  1. Open a Command Prompt window, and type :
    sqlcmd -SmyServer\instanceName.
  2. Replace myServer\instanceName with the name of the computer and the instance of SQL Server that you want to connect to. Press ENTER.
  3. The sqlcmd prompt (1→) indicates that you are connected to the specified instance of SQL Server.

Audit and monitor Windows security policy settings in real time with ADAudit Plus.

Download Now