Re: How to hide unauthorized databases with SQL 2005?



Thanks for the reply Dan. But the problem is, this statement applies for all databases that is not what I want. I need to allow userA to see one database while denying other databases. Is it possible. Have I missed anything?

Shane

"Dan Guzman" <guzmanda@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:%2300soIBaGHA.3304@xxxxxxxxxxxxxxxxxxxxxxx
VIEW ANY DATABASE is granted to public by default. If you want to remove
this permission from userA:

USE master
DENY VIEW ANY DATABASE TO userA

Although the user still has VIEW ANY DATABASE via public role membership,
the DENY takes precedence.

You could also REVOKE VIEW ANY DATABASE from public and then selectively
grant that permission to users as you see fit.

--
Hope this helps.

Dan Guzman
SQL Server MVP

"SL Coder" <sl_coder@xxxxxxxxxxx> wrote in message
news:e50gEfAaGHA.3704@xxxxxxxxxxxxxxxxxxxxxxx
> Hi,
>
> I have configure permission for userA and he can access only one database.
> When user estabilish the connection via management studio, though he
> cannot access other databases, he can see them. Is it possible to hide
> other databases for userA?
>
> Appreciate all your reply.
>
> Shane
>



Relevant Pages

  • Re: How to hide unauthorized databases with SQL 2005?
    ... VIEW ANY DATABASE is granted to public by default. ... DENY VIEW ANY DATABASE TO userA ... grant that permission to users as you see fit. ...
    (microsoft.public.sqlserver.security)
  • Cross DB ownership chaining
    ... I am having trouble setting up cross db ownership chaining. ... Using SQL Server 2000 SP3a. ... Create new database A1. ... Grant select permission on vTableA to UserA. ...
    (microsoft.public.sqlserver.security)
  • Re: Login failed for user (null). Reason: Not associated with a
    ... the database is installed on another machine from the web application. ... >>I got the following error message when I access the web application, ... >>I have two 2 accounts, userA and userB, which belong to the same group ... >>userB cannot and prompted the above error. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Cross DB ownership chaining
    ... UserA needs a security context in database A2, ... permissions need be granted. ... "Paul" wrote in message ... Add UserA to database A1. ...
    (microsoft.public.sqlserver.security)
  • Re: Cuban revolution victims now listed online
    ... Internet database of documented cases of victims of the Cuban revolution. ... with the nonprofit group Cuba Archive, for the first time their results ... Please show where any of the published data is incorrect Dan. ...
    (soc.culture.cuba)