Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Translate the entire conversation x

Deleting ACLs in Bulk

pwilliams-3
13-Aquamarine

Deleting ACLs in Bulk

10.1 M040. Does anyone have a good way of deleting ACLs in bulk?

Patrick Williams | Engineering Systems | c: 616.947.2110
[cid:image001.jpg@01CEA498.3660A250]

11 REPLIES 11

You can delete directly in the database table. Probably dire consequences result, but I've done that multiple times on a Windchill install on a laptop just to see.

Got an example query/delete SQL statement?


Patrick Williams | Engineering Systems | c: 616.947.2110
[cid:image002.jpg@01CEA4BD.6030ACE0]

Partick,

There is an API for deleting AccessControlRules

What exactly are you trying to do?

David Graham
Windchill Developer/Administrator
CAx Administrator


Emhart Glass Manufacturing Inc.
Emhart Glass Research Center
123 Great Pond Drive | Windsor, CT 06095 | USA
Telephone +1 (203) 376-3144 | Telefax +1 (860) 298 7397
Mobile +1 (203) 376-3144 |

I generally use SQL Developer and utilize the GUI tools

[cid:image001.png@01CEA4A6.49461860]

One note of caution here in this process. An ACL Policy Rule can have multiple ACL Entries grouped together. By doing this you may delete few extra ones.

Raju Pulavarthi
Sr. Systems Analyst - PLM Applications
Global Information Technology

No damage done for normals acls...ad hoc a different story...

As for query subselect from administrativedomain and policyacl or accesspolicyrule should do the trick. For softtypes may need the ida2a2 of wttypedefinition.




Sent from my Verizon Wireless 4G LTE Smartphone

This query seems to work quite nicely...

delete wtaclentry where ida2a2 in (select wtacl.ida2a2
from pdmlinkproduct p,
administrativedomain ad,
accesspolicyrule apr,
wtaclentry wtacl,
wtgroup wtg
where p.ida2a2 = ad.ida3containerreference
and ad.ida2a2 = apr.ida3domainref
and apr.ida2a2 = wtacl.ida3b3
and wtacl.ida3a3 = wtg.ida2a2
and p.namecontainerinfo = 'Global Product Template'
and ad.name='Standard'
and apr.classnamea5 = 'wt.epm.EPMDocument'
and wtg.name = 'PRODUCT LEADER');

Patrick Williams | Engineering Systems | c: 616.947.2110
[cid:image003.jpg@01CEA4CD.69D71F80]

I didn't have any ACLs for soft types so as David mentioned you will have to parse the apr.classnamea5 when you have a soft type. For example the apr.classnamea5 will have 'wt.part.WTPart|1234567' when there is an ACL on a soft type of WTPart. You will find the 1234567 in the WTTypeDefinition table in the idbranchiterationinfo column I believe. That's more SQL that I didn't need to write at the moment.

Patrick Williams | Engineering Systems | c: 616.947.2110
[cid:image001.jpg@01CEA4D0.AD948E30]

I don't yet delete ACLs through the database but here is the first layer of many I use to extract ACLs.

joe bell
Application Administrator

Yes and it helps to have sql developer open too as I left out the table name to deleted from as seen in your query..oops. 😉




Sent from my Verizon Wireless 4G LTE Smartphone

Sorry about the sloppy post.
I just didn't realize how many non-pdmlink tables and views I was using for this.

Here are the major parts needed to really get into ACLs.

joe bell
GSIMS Administrator
GPS Sustainment Information Management System
719-474-8899
bellj@gpssims.com<">mailto:bellj@gpssims.com>
Announcements



Top Tags