Login Permissions

  • Hi All,

    Can you please help me in finding out the permissions or previlagaes of a Login.

    Means what is the server roles that login is having, or to which database that is having the access and what permissinos it is having etc... using T-SQL

    Thanks advance

    Thank You.

    Regards,
    Raghavender Chavva

  • GUI: Adding a SQL Login to SQL Server

    It's how to add, but it shows the basic mechanism. You would just right-click on the login and choose Properties to get to the same dialog window.

    From the T-SQL perspective, you can execute multiple sp_helpsrvrolemember statements against the various fixed server roles. This works in all versions. Simplest to check a particular role's membership.

    In SQL Server 2005 and 2008 you can query against sys.server_role_members. This should get you started:

    SELECT

    SUSER_NAME(role_principal_id) [ServerRole],

    SUSER_NAME(member_principal_id) [Login]

    FROM sys.server_role_members

    K. Brian Kelley
    @kbriankelley

  • Thanks For your Help.

    Thank You.

    Regards,
    Raghavender Chavva

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply