HiveBrain v1.2.0
Get Started
← Back to all entries
snippetsqlMinor

How to access a SQL Server database using another user with permissions in the same intranet

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
samepermissionsthesqluserwithintranetdatabaseusinganother

Problem

While I'm waiting for my user to get access permissions, I'm stuck using a colleague's, and whenever I try to run basic SQL queries I have to switch from my Windows user to hers.

Hopefully this is clear enough: I want to access a SQL Server for which another user on the same intranet has permissions while I only have her credentials, and that the server utilizes Integrated Security.

Solution

You can open SSMS as her Windows user account by doing either of the following:

-
Right click the SSMS shortcut while holding the SHIFT key. Click on Open as another user and enter the other users credentials.

-
Create a shortcut in the following format:


C:\Windows\System32\runas.exe /savecred /user:DOMAIN\USERNAME
"C:\Program Files (x86)\Microsoft SQL
Server\140\Tools\Binn\ManagementStudio\Ssms.exe"

You'll need to replace the path to SSMS.exe with your version.

Once you open the shortcut and enter the password for the account, you can then simply double click the shortcut in the future as it will store your credentials for later use.

Context

StackExchange Database Administrators Q#222501, answer score: 8

Revisions (0)

No revisions yet.