Quality Center / ALM Practitioners Forum
Showing results for 
Search instead for 
Do you mean 

Delete Attachments in Test Lab via SQL

Frequent Advisor

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

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

Re: Delete Attachments in Test Lab via SQL

ALM 11

Patch 13