Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Generated SQL contains Byte-Order-Mark characters

SA-53339

Summary



Using the facility System Upgrade >Upgrade Applications Schema, from Designer Studio to generate a SQL file (as opposed to running from Designer Studio).

Running the SQL using the 'db2' command line tool results in the first SQL statement failing to be parsed - due to a 'syntax error'.

When the SQL file was downloaded it contains the Byte Order Mark (BOM) sequence at the start of the file. 

 


Error Messages



Syntax error given for *first* SQL statement in the file; the actual error will vary based on the actual SQL; but will contain a message like this:

> DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command.

 


Steps to Reproduce



1. Use the facility System Upgrade > Upgrade Applications Schema from Designer Studio to generate a SQL file.
2. Download the SQL file and use a HEX EDITOR to check for Byte Order Mark sequence at the start of the file.


Root Cause



A defect in Pegasystems’ code or rules:

 There is no obvious reason why a BOM signature is needed, only specific edge cases call for the the use of the BOM sequence.

BUG-357687 has been logged for this.


Resolution



Perform the following local-change steps:

Use the following command to remove the first three bytes on Unix OS:


dd if=original.sql of=altered.sql bs=1 skip=3

Confirm if the BOM sequence is present (use 'od -c' and so on).

In Windows OS; use a Text Editor which provided a Hex-Dump/Hex-Editor.

 

 

Published July 23, 2018 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us