Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have created a database in SQL Server 2008 and it shows in server object explorer to all users that can login to SQL.

I want to hide it from those users, I want it to be viewable by me only.

How can I do that? Any help, suggestions?

Many thanks

share|improve this question

migrated from stackoverflow.com Mar 11 '11 at 10:02

This question came from our site for professional and enthusiast programmers.

    
As far as I know, you cannot do this in SQL Server Management Studio. Everyone sees all databases - whether they can use anything inside them or not. –  marc_s Mar 10 '11 at 14:21
    
Just because they can see it, it doesn't mean they can access it. If you need to hide the existence of a database from other users, use a separate server (or instance) –  Damien_The_Unbeliever Mar 10 '11 at 14:23
    
possible duplicate of Setup a SQL Server database that's only visible to certain users –  p.campbell Mar 10 '11 at 14:35

1 Answer 1

Try this: In SQL Server Management Studio, right click the server and click "Properties". Click on "Permissions" and then select the "Public" role and remove "Grant" from "View Any Database".

share|improve this answer
    
+1 neato ! Great tip, thanks! –  marc_s Mar 10 '11 at 14:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.