Document Type | Troubleshooting
Category | Administration
Applicable Product Versions | 7FS01, 7FS02, 7FS02PS
Document Number | TADTS011
Issue
When performing an INSERT using Oracle DB Link in Tibero, the size of CHAR type columns changed, causing the data to be delivered including spaces to match the length.
As a result, an error occurred on the application (AP) side when attempting the INSERT.
NoteThis issue occurred during the upgrade from Tibero 5 SP1 (mswin949) to Tibero 7 FS02 (mswin949).
Cause
The cause of the issue is that the default character set of the dblink gateway was changed to UTF-8, and during the double character set conversion process, spaces were inserted.
The character set conversion path is as follows.
Tibero (mswin949) โ Gateway (UTF-8) โ Oracle (mswin949)
- If the character sets of the Gateway and Oracle differ, the Gateway converts the data to its own character set (such as UTF-8) before sending it to Oracle.
- When Tibero receives data from the Gateway, if the character sets between Tibero and the Gateway differ, Tibero performs an additional character set conversion.
- When retrieving data through a procedure, in PSM, the string length may increase due to character set conversion when setting BIND information, and the size is set based on the converted META information.
- As a result, unnecessary spaces may be added after CHAR type BIND parameters, or when performing CTAS (Create Table As Select), tables may be created with columns longer than originally intended based on the converted META information.
Solutions
The issue was resolved by changing the character set setting of tbgateway.
From Tibero 7 onward, the default character set of tbgateway is set to UTF-8.
Accordingly, changing the CHARACTER_SET value in the tbgw.cfg file to MSWIN949 and then restarting tbgateway can resolve the issue.
- Tibero 5 gateway default character set: MSWIN949
- Tibero 7 gateway default character set: UTF8
Note
It is possible to work around the issue by using the TRIM function in the affected procedure to remove spaces, with no side effects.
However, this is only a temporary solution; to accurately obtain column lengths and ensure convenience, it is preferable to modify the CHARACTER_SET in the tbgw.cfg file.