2 Replies Latest reply on Jan 9, 2019 7:44 AM by pdabrowski

    How to move Attachment out of DB to a 'location'

    pdabrowski Apprentice

      If anyone could help with moving and storing attachment out of database to a different location in Ivanti Service Desk 2018.3.

       

      I suppose we can imagine moving the files, but we need a way to move those and make them accessible from Incidents, Changes etc...

       

      I would appreciate any help.

        • 1. Re: How to move Attachment out of DB to a 'location'
          Julian Wigman ITSMMVPGroup

          If it is just a single attachment you can open it from with a window in the associated editor and then save it wherever you want.

           

          If it is a bulk export, I  wrote a SQL script and a small file extension setter utility a while ago that dumped out everything in the tps_attachment table to individual files in a folder and then tried to match them with an associated typical application.  This was because in the "old days" the clear-down scripts didn't initially include support for attachments so you could end up with all sorts of orphaned attachments in the table if you weren't vigilant.  My script could dump these out so you could see them and then, armed with the GUID's of the ones you no longer needed,  you could remove them (with care) from the tps_attachment table.  

           

          If you already know (or can extract a list of GUID's of the attachments you want to export via SQL) you could adapt my SQL export script to only do for those GUID's.   The challenge I had was the tps_attachment table knows nothing about the type of the attachment directly so for orphaned records I had to try and work out via my file extension setter app.

           

          Julian

          MarXtar Ltd

          • 2. Re: How to move Attachment out of DB to a 'location'
            pdabrowski Apprentice

            Thank you for your answer.

             

            The deal is to do this all the time and automatically. Those moved attachments still need to be accessible by everyone - I mean analysts and end users. So basically move in to writing an SQL script. About the accessibility, we think about a link in a text field - can you think of any more, errr... elegant way .

             

            Anyhow, will you be willing to share your script?