Home > Software design >  SQL Server user lost access to view
SQL Server user lost access to view

Time:12-22

I've experienced that a user lost the his access to a specific view unexpectedly. I had dropped and afterwards re-created the view yesterday so can this be the reason ?

CodePudding user response:

As mentioned in the comments, object permissions are also removed when a database object is dropped. It is necessary to re-grant permissions after the object is recreated.

Consider using ALTER VIEW instead of DROP/CREATE. ALTER will retain existing view permissions.

  • Related