You are viewing limited content. For full access, please sign in.

Question

Question

How do I find all Documents that have the inherit from parent unchecked?

asked on March 11, 2016

Hi All,

 

Does anyone know how to find all the documents that have the inherit from parent unchecked?

Even if it is a sql query that returns the document ids so I can then run a workflow to check the inherit from parent option for each document.

 

Thanks

 

Andrew

0 0

Answer

SELECTED ANSWER
replied on March 16, 2016

Sorry, my query doesn't take the recycle bin into account, here is an updated version that does:

select * from toc where etype=-2 and (toc_sdctl & 4096 = 4096) and (toc_flags & 2048 = 0)

The 2048 bit in toc_flags records whether an entry is currently in the recycle bin (including children of recycled folders).

1 0

Replies

replied on March 16, 2016

Hi again,

I have reduced the number of documents down to 200 but I am having issues with them.

I changed the query to remove documents in the recycle bin 

select * from toc where etype=-2 and (toc_sdctl & 4096 = 4096) and parentid <> 2

but when I try and search for the documents I can not see them or the parent folder.

I have tried to search using different user accounts and adding a user into every group in the system but still not finding the documents any ideas?

Andrew

1 0
replied on March 11, 2016 Show version history
select * from toc where etype=-2 and (toc_sdctl & 4096 = 4096)

etype=-2 finds all documents, the toc_sdctl & 4096 flag finds entries that don't inherit security from their parent.

The standard warning applies, make sure you backup your database before performing any direct sql manipulation.

0 0
replied on March 14, 2016

Thank you.

That worked I added the query to a workflow and set the permissions for each document in the folder specified by the parentid.

 

0 0
replied on March 16, 2016

Yes because people delete folders as well :)

Thanks that has resolved the issue for me.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.