Security – Requirements to set up “Run as different user” for SQL Server 2016

runasSecurityssisssms

Our organization has two types of accounts for server administrators. Both are individual user accounts in Active Directory tied to a given employee. However, they only give system (server and database) access using our admin-{user id} account. There are three ways to launch SQL Server Management Studio.

  1. Right click SSMS executable > Run As Administrator
  2. Shift + Right click SSMS executable > Run As Different User
  3. Click SSMS executable

For option #2, I get the following error after the login dialog launches and I enter my admin-{user id} credentials. What is required to set up the default server for this option to work and successfully launch the SQL Server Management Studio IDE, both on the client side and server side?

Error:

Only part of a ReadProcessMemory or WriteProcessMemory request was
completed.

enter image description here

When logging into Windows as this admin account, I get this:

User Profile Service service failed the login. User profile cannot be
loaded.

Best Answer

There were various answers online about deleting profiles in the registry. Although my issue was different. It turned out that my admin account was not assigned as an Administrator on my machine, so it wouldn't let me in, and thus, no profile. After adding in Control Panel\All Control Panel Items\User Accounts\Manage User Accounts\ > Add admin-{login} to this list as an Administrator, and then logging into my computer with this account, the C:\Users\admin-{login}_{domain}\ folder was created. Then I logged off, and logged in using {login} and repeated the workflow in the question. Wala!