Prasad on his blog (you can find the link on the right), has a really really useful collection of dql that can be used for various admin tasks. I’m going to slowly build up my own list of DQL for much the same purposes. A note on convention: This is standard convention but as a refresher (or for those not aware of that convention) anything within < > is to be filled in at runtime. Remove the < > brackets and replace with appropriate value.
- Updates the ACL on all content in a given folder...be aware it won't allow you to replace the ACL on a locked piece of content, so you'll either need to skip it like I have below or make sure that all the content is unlocked before trying to do this query, otherwise the error message is VERY VERY vague.
update dm_sysobject object set acl_name = '<acl_name>', set acl_domain = '<acl_owner>' where folder ('/<folder>', DESCEND) and r_lock_owner = "
- Replaces the ACL on all content in a given folder - this is an important change because it only overwrites a specific ACL rather than changing all the content to be under the new ACL, which could potentially be a security problem if the content has been locked down further. It's really only a simple change to the previous query.
update dm_sysobject object set acl_name = '<new_acl_name>', set acl_domain = '<acl_owner>' where folder ('/<folder>', DESCEND) and r_lock_owner = " and acl_name = '<old_acl_name>'