SQL Server: Script to Hide all Databases in SSMS

In this post, I provide one script to hide all databases for all public login in SQL Server Management Studio.
Generally, we are hiding all databases for security reason.
Using this script you can hide all databases for all user logins.

Once you execute this script, you will not be able to see any databases in SQL Server Management Studio. Only the sysadmin login or owner of the database can see the databases in SQL Server Management Studio.

Anvesh Patel

Leave a Reply

3 Comments on "SQL Server: Script to Hide all Databases in SSMS"

Notify of
avatar
Sort by:   newest | oldest | most voted
mackie
Guest

This is a great tip particularly to thopse fresh to
the blogosphere. Simple but very precise info…
Thank you for sharing this one. A must read article!

maulen
Guest

Thanks on your marvelous posting! I genuinely enjoyed reading it, you are a great
author. I will be sure to bookmark your blog and definitely will come back someday.
I want to encourage you to continue your great writing, have a nice
morning!

Maria
Guest

hi!,I like your writing so so much! proportion we keep in touch extra approximately your article on AOL? I need an expert on this space to resolve my problem. Maybe that’s you! Looking ahead to look you.

wpDiscuz