What is the use of sys_attachment_doc table in servicenow.

Kishor O
Tera Sage

What is the use of sys_attachment_doc table.

when I trying to copy attachment from ritm to sc_task I found a code in community where they copied attachment to both sys_attachment table and sys_attachment_doc table.

*Can anyone explain me this

link to community post of copy sc_task attachment to sc_req_item.

https://www.servicenow.com/community/itsm-articles/copy-attachments-to-ritm-from-sc-task/tac-p/26277...

1 ACCEPTED SOLUTION

Niklas Peterson
Mega Sage
Mega Sage

Hi,

The sys_attachment table contains the meta data about the attachment files and the sys_attachment_doc table contains the actual file data.

"When you store an attachment to any table, a record is created in the Attachment [sys_attachment] table that contains attachment metadata. The file data is stored in the Attachment Document [sys_attachment_doc] table, in 4k chunks. For example, if you attach a 12k file called My_attachment.pdf, then there is an Attachment entry with three related Attachment Document entries."

https://docs.servicenow.com/en-US/bundle/utah-platform-administration/page/administer/form-administr...

Regards,
Niklas

View solution in original post

1 REPLY 1

Niklas Peterson
Mega Sage
Mega Sage

Hi,

The sys_attachment table contains the meta data about the attachment files and the sys_attachment_doc table contains the actual file data.

"When you store an attachment to any table, a record is created in the Attachment [sys_attachment] table that contains attachment metadata. The file data is stored in the Attachment Document [sys_attachment_doc] table, in 4k chunks. For example, if you attach a 12k file called My_attachment.pdf, then there is an Attachment entry with three related Attachment Document entries."

https://docs.servicenow.com/en-US/bundle/utah-platform-administration/page/administer/form-administr...

Regards,
Niklas