sqlsql-serversql-server-2014sqlcmdinvoke-sqlcmd

How To Use Windows User For SQLCMD?


I need to Use Windows User for SQLCMD.

C:\Users\Administrator>sqlcmd -S myserver\myinstance -U mydomain\myuser -P ***

This Command Not Correct . How Can I figured This? Windows Authentication Is OK! Password is Correct! Windows User Added To SQL Login.


Solution

  • If you need to connect as a different user from an application, you need to use impersonation; you cannot pass Windows Credentials like SQL Authentication credentials.