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

Question

Question

Delete a document from the database

asked on February 20, 2015 Show version history

Hi, 

I have a customer that added a document to permanent volume in error. Does anyone know what table I would go to in the database to delete that document? 

 

Thanks,

 

Brian 

0 0

Answer

SELECTED ANSWER
replied on February 20, 2015

You would need to delete the corresponding row for the document in the toc table. The tocid column of the toc table contains the entry ID. Please make sure that the LFS service is not running when you modify the toc table.

I'd strongly recommend taking a back up of the SQL database before doing this.

0 0

Replies

replied on February 24, 2015

Thanks, Michael. I appreciate your help. 

0 0
replied on January 24, 2018

Hi All,

When running a delete * from toc where tod_id is blah blah, I get the following error. How can I get around this?

Msg 547, Level 16, State 0, Line 1

The DELETE statement conflicted with the REFERENCE constraint "entry_link_dest_fk". The conflict occurred in database "DBNAME", table "dbo.entry_link", column 'target_id'.

Cheers!

 

 

 

 

0 0
replied on January 24, 2018

Hi Chris,

That means your document has a document relationship affiliated with it. You can't delete the document reference because then the entry link reference would break. Check the metadata of the document in question and remove the entry link. 

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

Sign in to reply to this post.