How to extract all Attachments related to a subset of tickets?

Document ID : KB000097671
Last Modified Date : 23/05/2018
Show Technical Document Details
Attachments are stored as compressed files for CA Service Desk Manager.

How is it possible to extract these files and move them to a third party system?

Any CA Service Desk Manager/CA ITSM site with Attachments.
This is a general recommendation only. Further work is required by the site in order to build a run sheet to implement this in a specific environment. This is out of the scope for CA Support, but CA Services or a CA Business Partner may be engaged if required.

How can we extract all attachments related to a subset of cases retaining a reference to the case number? 
Looking to retrieve original formats for cases related to a single tenant (incident, request, problem & change). 



The physical files are stored in Repository location. Looking at a sample document under Administration, Attachments Library, Attachments will show the Repository used (eg "Service Desk") and the Physical Path eg C:/PROGRA~2/CA/SERVIC~1/site/attachments/default/servicedesk/files/rep_folder_00001 


The files are stored in a standard compressed ".gz" format, and are readable by any common file extractor such as WinZip, 7-Zip, TAR etc. 

Running the extract will produce the original file. 


The table dbo.attmnt contains the attachment information. You get a subset of this information when viewing the Attachments in the location listed in (1) and more information from this table if you open an Attachment in this location and look at the metadata. 

However, the table itself is probably the source information you should consider using, and contains fields such as the Attachment Name (attmnt_name), file name (file_name) which is the modified original file name for the compression and change of extension, file_type, repository folder (rel_file_path), repository (You would need to SREL this to get a plain English name. Attribute name is "repository.") and the "tenant." 

If you look through the information in (1) you can also see that it lists the ticket number to the screen (Field on screen is "Attached To" eg "Incident # 58"), so there would be an additional field/table that stores this as well. 


1) Using your method of choice (See opening sentence), you would then build the report to look at the above table to pull back a listing of all files for a specific Tenant. 

2) Then you'd need to run a batch based off this report to copy the compressed files from the physical locations. 

3) Finally, you'd need to run a decompression tool to extract the files.
Additional Information:
How can one find out what attachments are linked to which tickets in the backend database tables?

Can Service Desk Web Services work with MIME for the attachment methods: createAttachment() and createAttmnt()?