Re: How to hide unauthorized databases with SQL 2005?



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: Deny Create Database in SQL Server 2000
    ... Users do not have CREATE DATABASE permission unless you GRANT that permission, either explicitly or by role membership. ... Be mindful that DENY and REVOKE are different things. ... SQL Server MVP ...
    (microsoft.public.sqlserver.security)
  • Re: How to hide unauthorized databases with SQL 2005?
    ... Thanks for the reply Dan. ... I need to allow userA to see one database while denying other databases. ... 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)