- Plesk for Windows
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:
CONFIG_TEXT: USE master;It is possible to revert changes using the following query:
REVOKE VIEW ANY DATABASE TO PUBLIC;
CONFIG_TEXT: USE master;
GRANT VIEW ANY DATABASE TO PUBLIC;