On a Db object which all are the users having access?

Database

On a Db object which all are the users having access?

hi , could you please tell me how to find

which all are the users having access On a Db object?.

ex : i have a table user_sales_table , i would like to know the users list who has access to this table.

Thanks in Adv....

-- Raj

2 REPLIES
N/A

Re: On a Db object which all are the users having access?

Raj,

SEL USERNAME,accessright FROM dbc.allrightsv WHERE databasename = 'dbname' AND TABLENAME IN('all','tbname')

UNION

SEL D1.USERNAME,D2.Accessright FROM

(
SELECT Rolename,Grantee FROM dbc.rolemembers WHERE rolename IN (

SEL rolename FROM dbc.allrolerights WHERE databasename = 'dbname' AND TABLENAME IN ('all','tbname')))D1(Rolename,USERNAME),

(
SEL Rolename,accessright FROM dbc.allrolerights WHERE databasename = 'dbname' AND TABLENAME IN ('all','tbname'))D2(Rolename,Accessright)

WHERE D1.Rolename = D2.Rolename

;

Rglass

Re: On a Db object which all are the users having access?

Its really helpful , Thanks Rglass....:)