Masking set run fails with generic message.

I have a masking set on one table with 50 substitutions.  The run fails with the error message "String or binary data would be truncated. The statement has been terminated."  How do I identify which of the 50 substitutions is the culprit?
Thank you.
Tagged:

Answers

  • Eddie DEddie D Posts: 1,803 Rose Gold 5
    Hi unclepuff, thank you for your forum post.

    If you locate the SQL Data Masker log file for this failed masking attempt, does it reveal any further information?
    The log file location can be found the SQL Data Masker GUI ->Misc. Setup tab ->Directories tab ->the path to log file is list under Directory for Log Files.
    Or if using the command line, you will find the log file in the path specified in your PARFILE for the LOGFILEDIR= parameter.

    Just to confirm, this is one substitution rule that is masking 50 columns in one table?  Or you are masking 50 columns in this one table spread over two or more 
    substitution rules?  I ask this question, as if you have a single rule, you will most likely encounter performance errors.  Please consider splitting the rule in smaller more manageable chunks, further reading here.

    Check the rule particularly the VARCHAR and CHAR columns in that the data set selected is not going to insert a text string that excludes  the length of the column.

    Many Thanks
    Eddie
    Eddie Davis
    Senior Product Support Engineer
    Redgate Software Ltd
    Email: support@red-gate.com
  • unclepuffunclepuff Posts: 2 New member
    Hi Eddie.  Thanks for the reply.  I will attempt to split the masking rule because I am trying to mask 50 columns with one rule.  Performance is not really an issue at this point.

    I did review the log and could not find any more details than the time of the error and the message:
    2024-11-15 09:07:07 [Error] RuleWorker: HandleRuleWorkerLoopException: ENDING on SQL Server error {RuleId="01-0034", WorkerId="0", RunId="CVProd mask set errored on claim::202411150906446430001"}
    System.Data.SqlClient.SqlException (0x80131904): String or binary data would be truncated.
    The statement has been terminated.

    I did check that the char, varchar and text data types were the correct length for the rule and the data field.  Technically I don't care if the data is truncated.  I am struggling to locate in the Data Masker documentation how to set up ignoring errors.  

Sign In or Register to comment.