Sql-server – Granting a SQL Server database only user execute on xp_instance_regread fails

sql serversql-server-2012ssms

So I'm not finding an answer to my specific issue.

  • SQL Server 2012 database
  • SSMS 17 admin tool

Log on as a database (not domain) user foo.

Receive sys.xp_instance_regread no permission errors.

In past versions of SSMS you get the errors, but you can do your work on your database.

I've seen this before, the user needs execute permission on the stored procedure. Shoot I even have a script I use all the time for domain users

Grant Execute ON [sys].[xp_instance_regread] TO [domain\user];

So I modify it:

Grant Execute ON [sys].[xp_instance_regread] TO [foo];

but get this error:

Msg 15151, Level 16, State 1, Line 1
Cannot find the user 'foo', because it does not exist or you do not have permission.

Now the user exists and my account has sysadmin access.

Any ideas on how to fix this?

Best Answer

So if anyone is curious the fast answer was to go into the UI and add the foo user to master thru the user mapping tab.

Wonder why?