checking permissions

  • How will you check all the permission's that a particular user has with T-SQL script??

    Note: Even if the user has only "select" permission on a single table we should get that in the output.

  • exec sp_helplogins

    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    This thing is addressing problems that dont exist. Its solution-ism at its worst. We are dumbing down machines that are inherently superior. - Gilfoyle

  • sp_helprotect

  • sp_helplogins is only going to give you information about the login and any username associated to that login.

    sp_helprotect would give you the information you desired but only returns a report for the database you run it under, not every database in the instance.

    You would run it similar to this:

    Use MyDB

    GO

    exec sp_helprotect @username='MyName'

    GO

    If you search SSC or mssqltips.com I believe you can find a script that will help determine permissions for an account (login/username) across all databases.

    Shawn Melton
    Twitter: @wsmelton
    Blog: wsmelton.github.com
    Github: wsmelton

Viewing 4 posts - 1 through 4 (of 4 total)

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