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 hope the user can only see his own database name when connecting the database using SQL Server Management Studio, is it possible?

share|improve this question

2 Answers 2

You need to change the VIEW ANY DATABASE permission. By default it is granted to the public role, which is why all users can see all DBs.

share|improve this answer

I don't think it's possible - but why does it matter? Don't give their login any rights to anything besides their own database and they can't make queries or do anything else where they shouldn't.

/Edit - I knew that my knowledge is only good up through SQL 2005 - as LukeR says below, this is now possible with SQL 2008, so there you go.

share|improve this answer
    
It can matter if the database names are, say, the names of your other clients and your other clients wish to have their identities kept private. That said, if that's the case then you should have been aware of that from the start when using MSSQL –  Mark Henderson Sep 15 '10 at 2:14
    
It's also possible with 2005 msdn.microsoft.com/en-us/library/ms189077%28v=SQL.90%29.aspx –  LukeR Sep 15 '10 at 3:16

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.