cancel
Showing results for 
Search instead for 
Did you mean: 

Post Processing of Tables

Former Member
0 Kudos

In Erwin I'd use UDPs.  In PD, it says to use "extended attributes".  I'll admit now, I'm just confused and do not see how to replicate the UDP functionality in PD.  So, let me just tell you what I'm trying to accomplish and maybe somebody could hold my hand on this one.

Per table, I'd like to be able to enter permissions and groups that need to be applied to a table after it is compiled.

create table TBL1(xxx);

grant select on TBL1 to grp_read;

grant select, insert, truncate to grp_batch;

grant select, insert, update, delete, truncate to grp_support;

create table TBL2(xxx);

grant select on TBL1 to grp_read;

grant select, insert, update, delete to grp_support;

etc...

How would you accomplish this in PD?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Galen

I am assuming you always want to include same kind of  grant statements in your DDL script generation; Here is one way to do it:

From the PDM menu:

Database -> DBMS Properties -> Script -> Objects -> Table -> AfterCreate

on the right side "Value:" Box at the end of the existing text, type in the grants you would like to add, for example:

grant select on table [%QUALIFIER%]%TABLE% to grp_read;

next time when you preview the SQL for the table, PD automatically add the grant statement after the table creation statement.  Hope this helps.

Regards

Krishna

GeorgeMcGeachie
Active Contributor
0 Kudos

You don't need anything complicated, Galen. Assign permissions via the 'Permissions' tab on your Groups or Tables. To include them in generated SQL, you need to change your generation options.  On the Preview tab for a table, click on the "Show Generation Options" tool near the right-hand end of the toolbar (or press Ctrl/W) - select 'Permissions' in the right-hand pane, press OK and the permissions will appear in the preview. The generation options are also available on the Options tab when generating a database.

Former Member
0 Kudos

Hi George,

I don't see how to "Assign permissions via the 'Permissions' tab on your groups or tables".  I'm in the physical model.  Where do I find this tab?  I don't see it on the Table Properties.  I also don't see it in the drop-down list when I right-click on a table and I don't see it in the Model menu item.

I do see the permissions in the Show Generation Options.  So, I'm struggling on where to assign the permissions.

Thanks for the help so far!

GeorgeMcGeachie
Active Contributor
0 Kudos

You're probably not viewing all the tabs in the Table Properties - press the More>> button in the bottom right-hand corner of the window. If you want to see this tab all the time, you can add it to your favourite tabs.

To do this, click on the 'Property Sheet Menu' tool to the right of the More>> button, and select the following: