Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

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

To test connectivity to an instance of SQL Server, use the sqlcmd utility.

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

    sqlcmd [ /E ] [ /S servername ]
    
    

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

    sqlcmd [ /E ] /S servername\instancename
    
    

Community Additions

ADD
Show:
© 2015 Microsoft