Sorry, I haven't got element named count, I've just change names like my_primary_key and count to make my question shorter but unfortunately I complicated it. So names cannot be a problem. I'm wondering if I have rights to set permissions like these, I'm the owner of database objects, but I'm not sysadmin and db_owner. Does it change anything in this situation?
Are you the owner of all the objects in the view? from Books Online:
"If the ownership chain of a procedure or view is broken (not all the objects in the chain are owned by the same user), SQL Server checks permissions on each object in the chain whose next lower link is owned by a different user. In this way, SQL Server allows the owner of the original data to retain control over its accessibility."
Generally I find it to be a bad practice to have objects with any owner other than dbo in my database as it complicates permission setting and makes managing things harder as people come and go.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.