MS SQL database users are able to see names of MS SQL databases which are not owned by them.
Default MS SQL server behavior.
Warning: User’s databases will not be listed in MS SQL Management Studio after the solution below.
Note: ‘MASTER’ and ‘TEMPDB’ databases will always be visible to all users. It is not possible to make them invisible.
To revoke the permissions, do the following:
Connect to the server via RDP.
Open SQL Server Management Studio either locally, or via remote connection. Or use any web admin like MyLittleAdmin to access the database (Tools & Settings > Database Servers > Web admin).
Select the master database from the list of databases. Once the database is selected, click the button New Query.
Run the following SQL query to hide databases for all users:
REVOKE VIEW ANY DATABASE TO PUBLIC;
It is possible to revert changes using the following query:
GRANT VIEW ANY DATABASE TO PUBLIC;