Sunday, February 19, 2012

cannot set permission in SQL Server DBE for a database

In my attempts to connect a SQL database to VS I tried to set up permissions for the database in properties.

None of the checked boxes has been accepted. I set up "user or roles" to "public." Then a long list of "permissions" appear with two options: "permit" or "deny." The error message is "Grant Failed for database *****"

Additional Information: "Cannot grant, deny or revoke the connect database permission to roles and application roles." Big surprise!!! The whole form is designed to grant permissions to "roles."

Any ideas?

Thanks.the error message is correct - one can not grant, revoke or deny CONNECT DATABASE to roles or approles, because a role or approle is not a primary principal, i.e. can not connect to a database. Only a user, who is a primary principal can connect to a databse.

Hoewever, the UI should gray out those boxes, otherwise it becomes a usability problem, how you correctly noted above.

No comments:

Post a Comment