By default, if you connect to a remote SQL Server through an account that has access to say 1 out of 10 databases. You will still see all other databases in the Object Explorer, obviously due to permissions that you cannot request them, but you can see their names.
I heard that there is a method that disables this behavior, but I could not find the answer, does anyone know how to do this? To give an example, I have a SQL Server called MyDbServer, it has 4 databases,
- Mydatabase
- Yourdatabse
- Private database
- ReallyPrivateDb
If you connect through an account that has only permissions for "YourDatabse", you will still see a list of all other databases, query attempts will provide permission to "choose" or a similar error.
For security systems, we DO NOT want users to see any database other than the ones they were mapped to.
source share