Extracting Object Permissions
Teradata Teradata Discussion Forums Teradata.com Discussion Forum
Visit Teradata.com
Home       Guidelines    Member List
Welcome Guest ( Login | Register )
        


This online forum is for user-to-user discussions of Teradata products, and is not an official customer support channel for Teradata. If you require direct assistance, please contact Teradata support.


Extracting Object Permissions Expand / Collapse
Author
Message
Posted 9/30/2009 1:54:41 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 10/1/2009 9:58:26 AM
Posts: 7, Visits: 36
Hello,

Is there a way to find and extract the permissions of objects using bteq?

I want to create an output file that scripts out the permissions for a specific object (table, stproc, macro etc...)

ex.
grant select on db.tableA to userA;

Thank you for your help.
Post #16996
Posted 9/30/2009 3:11:42 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 2 days ago @ 7:09:10 PM
Posts: 1, Visits: 16
You should be able to query dbc.allrolerights and find list of accesses granted and who granted it.
Post #16997
Posted 9/30/2009 4:56:16 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 10/1/2009 9:58:26 AM
Posts: 7, Visits: 36
Thanks for the information. So what your saying is the easiest way to create a script of object permissions would be to create a dynamic query such as:

Substituing the dbc.allrolerights.accessright column with some kind of convert clause

select 'grant', (INSERT CONVERSION FUNCTION for accessright column here), on ', databasename,'.',tablename,'to ',RoleName,';' from dbc.allrolerights where tablename = 'whatever_table'

to form something like this...

grant select on database.tablename to rolename;

It seems like overkill. Is there something else like DDL extract functionality or something simpler like: SHOW TABLE tablex (which includes permissions on that table?)

Cheers
rrenn001
Post #16998
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 ( 0 guests, 0 members, 0 anonymous members )
No members currently viewing this topic.


All times are GMT -5:00, Time now is 9:21pm

Powered By InstantForum.NET v4.1.4 © 2009
Execution: 0.078. 7 queries. Compression Disabled.