I have my windows login given by my company. I use my windows authentication to login to my computer and then connect to any databases via SQL Server Management Studio(SMS) .
In order to connect to database using a domain account,
First, I make a shortcut of SQL Server Management Studio on my desktop.
Second, update the Target command with the following command. The path "c:\program files..." might be different because it depends on the location of your SQL server management studio is installed
C:\Windows\System32\runas.exe /netonly /user:DOMAIN\ACCOUNTNAME "C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\Ssms.exe"
Then, double click on the shortcut and enter domain account password.
SQL Server Management Studio will open and you will see your windows login(domain\yourlogin) but you are connected to a database as the domain account. Type sp_who2 in on the server and you can see your login as a domain account.
No comments:
Post a Comment