SQL Server permissions error


I have an AD account that i created and added to SQL Server Logins. It mapped it to a database with datareader role. Later I setup the account to have Execute permissions on a schema. When i go to the schema properties in the database(Security > Schemas) and select 'Effective' under permissions, I see this message:

Cannot execute as the server principal because the principal "" does not exist, this type of principal cannot be impersonated, or you do not have permission.

I have checked that it is not a orphaned login.

Users part of that AD group cannot access the objects part of the schema and they get the error message:

The EXECUTE permission was denied on the object '', database 'ABC', schema ''.

Can you please help in understanding what is happening and fix this?

more ▼

asked Aug 02, 2017 at 11:51 PM in Default

avatar image

Sagar Bhargava
638 26 30 34

(comments are locked)
10|1200 characters needed characters left

2 answers: sort voted first
more ▼

answered Aug 07, 2017 at 03:46 AM

avatar image

421 3 7

Thanks Jason. I can see that the SQL User is associated with the login and the login exists at the server level as well and they are linked.

Aug 09, 2017 at 01:50 AM Sagar Bhargava
(comments are locked)
10|1200 characters needed characters left

Try the following:

Check the Schema owner for the schema in question: Schema > Properties

With that owner name use the Database in question and try running the following query:

select suser_sname((select sid from sys.database_principals where name = N'**'));

Does this return a result?

If no result is returned then I believe this may be the issue.

more ▼

answered Aug 10, 2017 at 12:46 PM

avatar image

41 2

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.



asked: Aug 02, 2017 at 11:51 PM

Seen: 70 times

Last Updated: Aug 10, 2017 at 12:46 PM

Copyright 2018 Redgate Software. Privacy Policy