The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Data Too Long Error in sys_history_line0003 for user_id Column

samuelbingham
Tera Contributor

Hi ServiceNow Community,

On my change records, I have a related list that can add features and I'm encountering a database error in our instance when inserting into the sys_history_line0003 table. The error is:
"General Data Exception detected by database ((conn=26433) Data too long for column 'user_id' at row 1)"

The issue occurs during an audit operation related to a change task. The user_id field is being populated with a comma-separated list of email addresses (e.g., john.adams@example.com, andrew.jackson@example.com, ...), which exceeds the column's max_length. This seems to happen when logging assignment changes in the activity stream.

Details:

  • Table: sys_history_line0003
  • Problematic field: user_id (value length ~114 characters)

Questions:

  1. What’s the recommended max_length for sys_history_line.user_id, and is it safe to increase it?
  2. Is there a best practice for handling multiple email addresses in audit history instead of storing them in user_id?
  3. Could a business rule or notification script be misconfiguring this insert? Any tips on tracking it down?

Any insights or solutions would be appreciated! Thanks.

8 REPLIES 8

kaushal_snow
Mega Sage

Hi @samuelbingham ,

 

ServiceNow truncates field values to match the configured maximum length, so even if the data exceeds it, it causes errors or unexpected behavior. The user_id field typically tagged to the sys_user.user_name and is often fixed around 40 characters. Increasing it is not recommended, especially for user IDs.

 

Please go through this Now support article -

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0870001

If you found my response helpful, please mark it as ‘Accept as Solution’ and ‘Helpful’. This helps other community members find the right answer more easily and supports the community.

 

 

 

 

 

Thanks and Regards,
Kaushal Kumar Jha - ServiceNow Consultant - Lets connect on Linkedin: https://www.linkedin.com/in/kaushalkrjha/

hello so if I increased the max length on the sys_history_line table, this wouldn't be an ideal thing to do?

 

DrewW
Mega Sage
Mega Sage

I'm a little confused.  Are you trying to enter data directly into History line or the audit table?

 

The system typically just truncates the data entered into a field last I knew.  ServiceNow may have done something special for the table thou.  You could make the field longer but that is a system table and you may regret messing with it later.

 

 

No, the error pops up when I submit a change request and theres a group in the assignment field of the change request. I have a related list that adds features to the change request. Upon adding these features to the related list on the change request records is typically when the error pops up.