| title | Log In to an Instance of SQL Server (Command Prompt) | Microsoft Docs | |||||
|---|---|---|---|---|---|---|
| description | Learn about the "sqlcmd" utility. See how to use it in a command prompt to test connectivity to an instance of SQL Server. | |||||
| ms.custom | ||||||
| ms.date | 03/14/2017 | |||||
| ms.prod | sql | |||||
| ms.prod_service | high-availability | |||||
| ms.reviewer | ||||||
| ms.technology | configuration | |||||
| ms.topic | conceptual | |||||
| helpviewer_keywords |
|
|||||
| ms.assetid | f67c11e3-c519-40c9-82c1-07efa9d9985e | |||||
| author | markingmyname | |||||
| ms.author | maghan |
[!INCLUDE SQL Server] This topic describes how to test connectivity to an instance of [!INCLUDEssNoVersion], use the sqlcmd utility.
-
From a command prompt, enter the following command to connect by using Windows Authentication:
sqlcmd [ /E ] [ /S servername ]
-
From a command prompt, enter the following command to connect by using Windows Authentication:
sqlcmd [ /E ] /S servername\instancename