Data Truncation exception when creating new Request Filters

Data Truncation exception when creating new Request Filters

Hi All,

Just a FYI post of an issue that I came across recently.

We had a couple of users reporting that when trying to create a new custom filter for requests they were being presented with a 500 error and a stack trace.

Upon investigation of this error the root cause of this was found to be a Data Truncation SQL exception when inserting the row in dbo.Criteria (this is on MsSQL Server)

After looking into the logs and finding that the LOGICALREPRESENTATION field on this table was set to nvarchar(300) and the record trying to be inserted was 305 characters long the issue because obvious as to the cause.

I was able to fix this by extracting the data from the table, and re-creating the column (as an alter column was not possible, a full drop column, add column was required - dropping the table would break the foreign keys on this table as well), after the column was re-added with a greater length and the data updated custom filters were able to be created again.  All of these modification were done with the service desk service shutdown of course.

Something that may wanted to be considered for a patch would be to update the definition of this table so that the column is larger than 300 as the filters in question were not overly complicated but did have a few filters on them.

Regards,
Blake















                  New to ADSelfService Plus?