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

Question

Question

Using an SQL script to change the document Owner

asked on September 5, 2014

We have a client that wants to change the owner of all the documents to no owner.  They just want all of their documents not to be owned by anyone because they have experienced issues when some documents have an owner.  They want to update this from within the TOC table and they would like to run this script to accomplish that:

 

UPDATE [dbo].[toc] SET

       [toc_owner] = '0x010100000000000000000000'

WHERE [toc].[toc_owner] <> '0x010100000000000000000000'

 

 

 Please let me know if this would do what they are wanting to do and if you feel there are any issues with running this script against the database table.

 

Thanks

0 0

Replies

replied on September 5, 2014

Another option to perform this operation, rather than directly editing the database, would be to use Workflow and the Set Entry Owner activity. Your workflow could search the repository for all entries and then use a For Each loop and the Set Entry Owner activity to clear each entry's owner.

1 0
replied on September 5, 2014

This is an option. However, OP wants to know if there are any side effects to using the SQL script other than just changing ownership. Are there other tables to be aware of? Will Laserfiche "care" that you changed ownership outside the bounds of the API or a front end application?

0 0
replied on September 5, 2014

Simply put, in general we do not recommend making changes directly to the database. An errant command or an incompatible value can easily cause system instability or loss of data. 

 

In this case, where there is a clear method of performing this action using a product such as Workflow that would certainly be the recommended avenue. Second to that would be updating the data using the Laserfiche SDK.

 

If one were to nevertheless update the database directly in the manner proposed in the original post, I would strongly urge that this would first be tested in a non-production environment to verify the success of the SQL script and afterward stability of the system.

1 0
replied on September 5, 2014

What issues are they seeing by having an owner?

1 1
replied on September 5, 2014

Owners can modify security on the entry. If access rights are centrally managed then you may not want users modifying security on arbitrary documents.

 

http://www.laserfiche.com/support/webhelp/Laserfiche/9.1/en-US/UserGuide/Laserfiche_Client.htm#Security/Entry_Ownership.htm

0 0
replied on September 5, 2014

You could turn off Document Ownership in the Admin Console.  Not sure if this will remove the Owner from all existing documents, or just from new documents going forward, but I'd try this first.

 

-Open the Admin Console and expand 'Repository Options'

-Right-click on Settings and select 'Properties'

-Click the 'Documents' tab

-Select the 'No ownership will be assigned' radio button

0 0
replied on September 5, 2014

As you assumed, this will only take effect on new documents created after changing this setting.

0 0
replied on September 5, 2014

Yes, they did this and they want to run this script on the documents that where already there before they enabled that feature.

 

Thanks

0 0
replied on September 9, 2014

Hi Derick, 

 

If your question has been answered, please let us know by clicking the "This answered my question" button on the appropriate response.

 

If you still need assistance with this matter, just update this thread. Thanks!

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

Sign in to reply to this post.