Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Hide databases in Mgt Studio

Author  Topic 

tklooster
Starting Member

2 Posts

Posted - 2010-12-21 : 14:36:27
Hi,
I have a user that has access to only 1 database. I'd like to hide the other databases from that user in SQL Mgt Studio so they can't see them. Reason is they belong to other customers. Is there a way to do this? I know they can't open them but we need to go a step further.
Thanks,
Tim

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2010-12-21 : 15:09:49
[code]DENY VIEW ANY DATABASE to [login];[/code]
Go to Top of Page

tklooster
Starting Member

2 Posts

Posted - 2010-12-22 : 12:24:25
Thanks Russell - that works great. Any suggestions on how to enable view on a single db after doing this? I tried this but it didn't seem to work.

GRANT VIEW DEFINITION ON DATABASE::mydb TO myuser
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2010-12-22 : 14:09:07
[code]USE yourDatabase;
GO
GRANT CONNECT To [login];
GO[/code]
Go to Top of Page
   

- Advertisement -