Access SQL Server using Command Prompt

sqlcmd -S servername -d databasename -U username -P password -I

select @@servername, db_name(), suser_name()

GO

More Information: https://docs.microsoft.com/en-us/sql/ssms/scripting/sqlcmd-start-the-utility?view=sql-server-2017

Add Comment