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?
asked Aug 02, 2017 at 11:51 PM in Default
Hope this works for you
answered Aug 07, 2017 at 03:46 AM
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.
answered Aug 10, 2017 at 12:46 PM