How to hide SQL databases that a user does not have access to

By default even if a user does not have access to an SQL database they can still view it when logging into SQL Management studio. Therefore the same behaviour will be seen in Pyramid when connecting to an SQL data source . If you want the users to only see the database that they have access to, then you can add edit the SQL role called "Public". Set the property "View any database" to "Deny". Now when a user logs in, they will only see the databases that they have access to.

1) Login to SQL Management studio and connect to your SQL instance.

Expand Security>Server Roles> and double click on the "Public" role


2) Expand Servers and select your SQL instance. Then tick the box Deny for "View any database"Please note that there are other ways of doing this, or by just setting a deny view permission on specific databases. Lots more information on this topic can be found on the internet. 

Reply Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
Like Follow
  • 3 yrs agoLast active
  • 1883Views
  • 1 Following