Report

  • Hi Team,

    For pre-paring report I need this format report on instance.

    Database Name Database User Name Database User Permission

    Request to you please give any ideas on this format. Thanks in advance.

  • shiv-356842 (7/30/2014)


    Hi Team,

    For pre-paring report I need this format report on instance.

    Database Name Database User Name Database User Permission

    Request to you please give any ideas on this format. Thanks in advance.

    I'm not sure what you are asking for. Does this thread help?

    Here is the query from that thread with the DB Name attached:

    selectDB_NAME(db_id()) as [Database Name]

    ,sys.schemas.name 'Schema'

    , sys.objects.name Object

    , sys.database_principals.name username

    , sys.database_permissions.type permissions_type

    , sys.database_permissions.permission_name

    , sys.database_permissions.state permission_state

    , sys.database_permissions.state_desc

    , state_desc + ' ' + permission_name + ' on ['+ sys.schemas.name + '].[' + sys.objects.name + '] to [' + sys.database_principals.name + ']' COLLATE LATIN1_General_CI_AS

    from sys.database_permissions join sys.objects on sys.database_permissions.major_id = sys.objects.object_id join sys.schemas on sys.objects.schema_id = sys.schemas.schema_id join sys.database_principals on sys.database_permissions.grantee_principal_id = sys.database_principals.principal_id order by 1, 2, 3, 5



    Microsoft Certified Master - SQL Server 2008
    Follow me on twitter: @keith_tate

    Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • You can download a script here that will provide a pretty decent security audit report for you.

    http://jasonbrimhall.info/2010/03/19/security-audit/

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

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

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