Re: guest User Activated?



OK,

I figured it out. This returns the name of every database where the "guest"
user has been activated (GRANT CONNECT):

use master
exec dbo.sp_MSforeachdb '
use [?]
select DB_NAME() + ''.'' + permission_name
from sys.database_permissions
where grantee_principal_id = DATABASE_PRINCIPAL_ID(''guest'')
and permission_name = ''CONNECT'''

--
Thank you,

Daniel Jameson
SQL Server DBA
Children's Oncology Group
www.childrensoncologygroup.org
"Daniel Jameson" <djameson@xxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:u0OmQGlcHHA.4888@xxxxxxxxxxxxxxxxxxxxxxx
Hi,

How do I, in SQL 2005, determine for a database whether the guest user has
been GRANTed CONNECT?

--
Thank you,

Daniel Jameson
SQL Server DBA
Children's Oncology Group
www.childrensoncologygroup.org



.



Relevant Pages

  • Re: Guest account in SQL 2005?
    ... The guest account in SQL Server serves the same basic function as the ... just like you wouldn't grant permissions to the Everyone group in Windows. ... priviledges in the database. ...
    (microsoft.public.sqlserver.security)
  • Re: Is there a way to Use an Application Role with more than one database?
    ... So you are still getting the 'is not a valid user in database' error? ... Did you enable the guest user? ... permissions to systems objects in the ProductionDB?) ... EXEC sp_dboption 'DevelopmentDB', 'db chaining', true ...
    (microsoft.public.sqlserver.security)
  • Re: Guest account in SQL 2005?
    ... You should not need go grant permissions to the guest user as that defeats ... Did you set DB_CHAINING ON for both database A and B? ... SQL Server MVP ...
    (microsoft.public.sqlserver.security)
  • Re: Guest Account
    ... The guest accout is a way for people to access a database - NOT the sever. ... There is no login that is directly associated with guest... ... As for the guest account in Northwind/Pubs - yes, ...
    (microsoft.public.sqlserver.security)
  • The sql sever is sql2000 standard edition running on win2000
    ... > to grant stored procedures execution permition to role, ... Master database get Information_Shema as a user. ... > database", sp_helpuser did not show guest user, enterprice manager show it ...
    (microsoft.public.sqlserver.security)