question

Sagar Bhargava avatar image
Sagar Bhargava asked

SQL Server permissions error

Hi, 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?
securitypermissions
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jason_clark03 avatar image
jason_clark03 answered
1 comment
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

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.
0 Likes 0 ·
Adedba avatar image
Adedba answered
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.
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.