Re: Delete Attachments in Test Lab via SQL (210 Views)
Reply
Frequent Advisor
JallenJax
Posts: 56
Registered: ‎03-15-2012
Message 1 of 3 (225 Views)

Delete Attachments in Test Lab via SQL

I need to remove attachments in Test Lab and Defects modules to clear up more disk capacity on our File System.  I deleted a row from the Cross Reference table and I saw it deleted from the UI, but how do I check to see if it actually deleted it?  I can't drill down in the file system to check.  Thanks in advance.

Honored Contributor
Trudy Claspill
Posts: 3,772
Registered: ‎09-09-2010
Message 2 of 3 (211 Views)

Re: Delete Attachments in Test Lab via SQL

What version of the product are you using?

If you are using v11.0 or newer, the Cross Reference table is not the only table that contains data about files stored in the Repository (whch Attachments are). With v11.0 and higher you have to take into account the Smart Repository features. Those implemented two additional tables to track the Logical location of files in the Repository and link that to the Physical location of files in the Repository. The tables that track that info would also have entries for attachments. I don't know exactly how Smart Repository knows when it is okay to delete a file, but simply removing entries from the tables may not be enough.

I think you would be better off using the API to remove attachments.

The only way for sure to know that it is gone and the disk space has been freed is to drill into the file system. With the Smart Repository feature, ALM may report that there is no attachment, but the file may not have been actually deleted yet.
[If this post solves or helps solve your issue, mark the thread as solved and give KUDOS to the author for their assistance.]

(Opinions expressed in my postings are mine alone, and do not reflect the opinions of my employer.No warranties express or implied for any solution/suggestion posted.)
Frequent Advisor
JallenJax
Posts: 56
Registered: ‎03-15-2012
Message 3 of 3 (210 Views)

Re: Delete Attachments in Test Lab via SQL

ALM 11

Patch 13

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.