Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8179735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T00:03:54+00:00 2026-06-07T00:03:54+00:00

I want to get list of tables in a given database and a given

  • 0

I want to get list of tables in a given database and a given schema which do not have update permissions for a given user.

How can I do it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T00:03:55+00:00Added an answer on June 7, 2026 at 12:03 am

    Following should work.

    http://consultingblogs.emc.com/jamiethomson/archive/2007/02/09/SQL-Server-2005_3A00_-View-all-permissions–_2800_2_2900_.aspx

    based on this i have modified a script and added object type descirption to the list which displays table for user, object , permission type , permission

    so you can add where caluse to filter to user_table objects , filter further by user and permission type

    declare @type_desc varchar(100)
    declare @user varchar(100)
    
    
    WITH    perms_cte as
    
    (
    
            select USER_NAME(p.grantee_principal_id) AS principal_name,
    
                    dp.principal_id,
    
                    dp.type_desc AS principal_type_desc,
    
                    p.class_desc,
    
                    OBJECT_NAME(p.major_id) AS object_name,
    
                    o.type_desc,
    
                    p.permission_name,
    
                    p.state_desc AS permission_state_desc
    
            from    sys.database_permissions p
    
            inner   JOIN sys.database_principals dp
    
    
            on     p.grantee_principal_id = dp.principal_id
    
            inner join sys.objects o
    
            on o.object_id =p.major_id
    
    )
    
    --users
    
    SELECT p.principal_name,  p.principal_type_desc, p.class_desc, p.[object_name], p.type_desc,p.permission_name, p.permission_state_desc, cast(NULL as sysname) as role_name
    --select *
    FROM    perms_cte p
    
    WHERE   principal_type_desc <> 'DATABASE_ROLE'
    
    UNION
    
    --role members
    
    SELECT rm.member_principal_name, rm.principal_type_desc, p.class_desc, p.object_name, p.type_desc,p.permission_name, p.permission_state_desc,rm.role_name
    
    FROM    perms_cte p
    
    right outer JOIN (
    
        select role_principal_id, dp.type_desc as principal_type_desc, member_principal_id,user_name(member_principal_id) as member_principal_name,user_name(role_principal_id) as role_name--,*
    
        from    sys.database_role_members rm
    
        INNER   JOIN sys.database_principals dp
    
        ON     rm.member_principal_id = dp.principal_id
    
    ) rm
    
    ON     rm.role_principal_id = p.principal_id
    
    order by 1
    

    another useful link
    http://www.mssqltips.com/sqlservertip/2132/auditing-sql-server-user-and-role-permissions-for-databases/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to get a list of objects from the database between a given
I want to get a list of all TRs that do not include THs.
Hoping I can get some architectural advice on this. I have been given the
I have an app (for a given twitter user) that gets a list of
In this stored procedure I want to get list of all the tables of
I want to get list of columns of a table using GetSchema method in
Taking in consideration a table tbl_users , I want to get a list of
I want to get list of Domino Servers on the network, and accordingly login
i want to get list of all application or Threads attached with a process.For
I want to get list of methods in current file, when my tool is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.