Reputation: 115
Can any body know how to restrict Admin from viewing all the stored procedure in SQL Server Management Studio? (Because here 4 people is having Admin access in that we want to restrict 2 users from viewing stored procedure...)
Upvotes: 0
Views: 276
Reputation: 11773
A member of the sysadmin server role cannot be effectively restricted in SQL Server. While you might be able to come up with some elaborate combinations of db features that might temporarily restrict what a sysadmin can do, you won't be able to prevent them from disabling this construct.
(This is btw true for local (Windows) admins too. While local admins do not have sysadmin access by default, it is easy for a local admin to add the own account into the sysadmin role.)
If those persons are not allowed to see the procedures, they are clearly not "sysadmin"s. Remove them from the role and grant only the permissions they really need.
Upvotes: 2