Determining windows grouop membership of a SQL login



Hello,

I'm trying to determine the windows group membership of a SQL login I've
created from a Windows login. Specifically, I'm trying to determine if the
login is in BUILTIN\Administrators or otherwise has admin permissions. For
example,

CREATE LOGIN <login> FROM WINDOWS WITH DEFAULT_DATABASE <database>
USE <database>
CREATE USER <login>

The CREATE USER call will fail if the login has admin privs because they
already have access under 'dbo'. So how do I go about determining the
membership of this login? sp_helplogins, sp_helpuser, sp_helpgroup don't
seem to provide the information I need.

Suggestions?

Keith


.



Relevant Pages

  • Re: Determining windows grouop membership of a SQL login
    ... I'm trying to determine the windows group membership of a SQL login I've ... the login is in BUILTIN\Administrators or otherwise has admin permissions. ...
    (microsoft.public.sqlserver.security)
  • Re: Determining windows grouop membership of a SQL login
    ... I'm trying to determine the windows group membership of a SQL login I've ... The CREATE USER call will fail if the login has admin privs because they ...
    (microsoft.public.sqlserver.security)
  • Re: Granting xp_cmdshell permission to SQL Login
    ... Windows login, but I have a SQL Login. ... The 1329 error isn't related to the SQL login executing xp_cmdshell but is rather the Windows error code returned because the xp_cmdshell proxy account doesn't have the needed Windows permissions ... My guess is that the Windows login you mentioned is a sysadmin role member. ...
    (microsoft.public.sqlserver.security)
  • Re: Not associated with a trusted SQL server connection
    ... It sounds like you have it set for Windows Authentication ... If you want to use a SQL login, ...
    (microsoft.public.sqlserver.setup)
  • Re: Need help urgently - Replication ERROR 18456
    ... servers, but I tried to do what you suggested. ... (login failed for user mac). ... 'mac' is a SQL login as is 'war'. ...
    (microsoft.public.sqlserver.replication)