views:

115

answers:

2

I have a user Sql Authentication account that has remote access to my database server. The user has a default database, and is only able to access or modify that DB. So far so good. However, I'd like to prevent the user from viewing the other databases that he doesn't have access to anyway.

Inside server permissions, I can deny the user the ability to "View Any Database", but then he can't see even the one database he's allowed to modify. He can still execute SQL against it, but he has no gui access through sql mgmt studio.

Is there a way to set this up properly?

Thanks.

A: 

Try setting Server Role to Public and Database Role to db_owner.

Lukasz Lysik
I've added the user to the database in question and made him the owner of it. Network Service account is also an owner so that IIS can connect using Windows Auth. How do I change the Role of the server and role of the database?When I add the user to the public role under /Security/Roles the change doesn't take effect and doesn't seem to change anything.
Scott
A: 

You can allow view in SSMS if your remote login owns the database.. which is different to db_owner

gbn
Thanks gbn, that worked, but I don't know why? Doesn't sp_changedbowner effectively do the same thing as right-clicking users, adding the username and then checking db_owner under Role Members?Is there a way also now to prevent the user from viewing the other admin areas, such as "Security", "Server Objects", "Replication" and "Management"?
Scott