How to export attachment file from table to MID server for back up?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2023 10:54 PM
I would like to export attachment file (MS Word, PPT, Excel, etc.) from a table to somewhere in MID server for back up.
I understand that "Export Set" can be used to easily export records data from ServiceNow to MID server.
However, it doesn't seem to be able to export attachment using that... Is there any good way to easily export attachment file on table to MID server?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2023 01:59 AM
Attachments are stored inside sys_attachment and sys_attachment_doc tables. sys_attachment stores the meta data e.g. file name, table name, table sys_id etc. where as the sys_attachment_doc table stores attachment in form of binay data.
You can export the data from both these tables and recreate the attachment on MID server by sequencing the data packets from sys_attachment_doc table according to their position (it is a field on sys_attachment_doc).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-19-2023 01:34 PM
Hi Sandeep,
Can you share any code after exporting data how where you able to recreate attachment on the mid server using sys_attachment_doc table.
Thanks
Gautam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2024 02:10 AM
Hi Aki18,
I got similar requirement. Could you please help me with the solution if you were able to achieve this?
Thanks,
Rutuja