I am trying open SQL Server Management Studio as different user than that I am logged in as in the below command but SQL Server Management Studio is opening but not as the User DevAdminAm, it is just opening like my login user not as different user
runas.exe /noprofile /netonly /user:XXXXXtrs\DevAdminAm "C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\Ssms.exe"
Can anybody please help me why is it not opening when I save it as batch file and double click it or when I run it as windows command in the startup.
When I run it in startup, it opens SSMS but not as different user as I am intending, any help please.
2条答案
按热度按时间i5desfxk1#
I got it. Try to set in your credentials manager with these credentials:
servername.tld:1433
domain\account
domain\account
3vpjnl9f2#
The UI will show you your currently logged in local user, e.g. in the connection dialog and Object Explorer, but when you are connected to the server and run
SELECT SUSER_SNAME();
, it will show your specified domain account.See the explanation about that here and also mentioned several places here, e.g. this answer .