Log In to an Instance of SQL Server (Command Prompt)
Applies to: SQL Server
This topic describes how to test connectivity to an instance of SQL Server, use the sqlcmd utility.
To log in to the default instance of SQL Server
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
From a command prompt, enter the following command to connect by using Windows Authentication:
sqlcmd [ /E ] /S servername\instancename
See Also
Feedback
https://aka.ms/ContentUserFeedback.
În curând: Pe parcursul anului 2024, vom elimina treptat Probleme legate de GitHub ca mecanism de feedback pentru conținut și îl vom înlocui cu un nou sistem de feedback. Pentru mai multe informații, consultați:Trimiteți și vizualizați feedback pentru