Skip to content

Latest commit

 

History

History
43 lines (33 loc) · 1.48 KB

log-in-to-an-instance-of-sql-server-command-prompt.md

File metadata and controls

43 lines (33 loc) · 1.48 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic helpviewer_keywords
Log In to an Instance of SQL Server (Command Prompt)
Learn about the sqlcmd utility. See how to use it in a command prompt to test connectivity to an instance of SQL Server.
rwestMSFT
randolphwest
03/14/2017
sql
configuration
conceptual
logins [SQL Server], named instance of SQL Server
log ins [SQL Server]
logins [SQL Server], default instance of SQL Server
command prompt [SQL Server], logins
logging in [SQL Server]

Log In to an Instance of SQL Server (Command Prompt)

[!INCLUDE SQL Server] This topic describes how to test connectivity to an instance of [!INCLUDEssNoVersion], use the sqlcmd utility.

To log in to the default instance of SQL Server

  1. From a command prompt, enter the following command to connect by using Windows Authentication:

    sqlcmd [ /E ] [ /S servername ]  
    
    

To log in to a named instance of SQL Server

  1. From a command prompt, enter the following command to connect by using Windows Authentication:

    sqlcmd [ /E ] /S servername\instancename  
    
    

See Also

sqlcmd Utility
osql Utility