I would like to move my Attachments directory to a new drive.

Version 1

    Details

    From C:\SM_Attachments to E:\SM_Attachments


    I copied all the data to the new drive and tested. There must be a command to update all the attachment locations in the HEATSM database to point to the new directory. I searched knowledge and the community but did not find the answer. 

    Attachment Path: File System
    Attachment Path: C:\SM_Attachments

     


    Resolution

     

    If you have already moved the files to the new attachment location, then you will want to do a couple of things. But first, make sure you have a good backup of the database before doing anything and it is a good idea to copy the attachments to the new location before deleting them from the old location.


    To change the file directory location for existing attachments:

            1,  Run the following SQL Query in MSSQL Management Studion (NOTE:  Backup the DB before doing this!!):          

                    USE [DATABASE_NAME]

                    UPDATE Attachment

                    SET AttachmentPath = 'New_Location'

                    WHERE AttachmentPath = 'Old_Location'

            2.  Test an existing Incident/Attachment to make sure it is accessible. (NOTE: This will only work if you have already copied all the attachments from the Old_Location to the New_Location.



    Change the file directory location for new attachments:

            1.  Login to the ConfigDB and open/edit your Tenant.

            2.  Change the "Attachment Path" to the new location.

            3.  Save the Tenant change.