Shahid Karimi
Shahid Karimi

Reputation: 4357

SQL Server strange connection issue

When I connect to my live SQL server database. Despite of giving the database it displays a long list of databases. I have to look up my database among these all databases.

Is there any way so that I can view only my database when connect to the server?

Upvotes: 0

Views: 55

Answers (1)

Martin Smith
Martin Smith

Reputation: 453628

You need to get the VIEW ANY DATABASE permission revoked on the login you are using.

I just tested setting up a new login called bar and running DENY VIEW ANY DATABASE TO bar; but that failed with the message

Cannot grant, deny, or revoke permissions to sa, dbo, entity owner, information_schema, sys, or yourself.

So you will need to get the sysadmin to do this.

Upvotes: 2

Related Questions