MSSQL user can see all databases

Created:

2016-11-16 13:02:46 UTC

Modified:

2017-08-16 16:52:23 UTC

0

Was this article helpful?


Have more questions?

Submit a request

MSSQL user can see all databases

Applicable to:

  • Plesk for Windows

MS SQL database user is able to see MS SQL database names which are not owned by him.

Cause

This issue should be addressed to Microsoft as the provider of SQL Server.

Resolution

If you want better security, do the following:

  1. Log into SQL Server Management Studio either locally, or via remote connection.
  2. Select "master" database from the list of databases. Once the database is selected, click the button "New Query".
  3. Run the following SQL query:

    CONFIG_TEXT: USE master;
    GO REVOKE VIEW ANY DATABASE TO PUBLIC;

Please note that "MASTER" and "TEMPDB" databases will always be visible to all users. It is not possible to make them invisible.

Have more questions? Submit a request
Please sign in to leave a comment.