Article

How to troubleshoot error 8184 for INSERT statements against trend database?

Information

 
EnvironmentProduct: OpenEdge
Version: All supported versions
OS: All supported platforms
Question/Problem Description
How to troubleshoot error 8184 for INSERT statements against trend database?
How to identify root cause of 8184 errors that appear in the admserv.log file when trying to execute INSERT statements against the trend (fathom) database?

 
Steps to Reproduce
Clarifying Information
Error Message=== SQL Exception 1 ===
SQLState=HY000
ErrorCode=-20152
[DataDirect][OpenEdge JDBC Driver][OpenEdge] Character string is too long (8184)
Defect/Enhancement Number
Cause
Resolution
The 8184 error is associated with a SQL INSERT Statement trying to update a field in the trend (fathom) database that has a SQL width that is not able to accommodate the data trying to be inserted into the field.   In order to identify which field has the SQL Width issue do the following:
  1. Make a copy of the SQL statement in the admserv.log file.
  2. If the statement has double quotes (""), change them to a single quote.
  3. Backup the existing trend database for testing purposes.  Example:   probkup online /usr/oemgmt/db/fathom fathom.copy
  4. Restore the backup to a new name for testing purposes:  Example:  prorest testdb fathom.copy
  5. Start the database so as to be able to connect to the database to test the SQL INSERT statement.  Example:  proserve testdb -S 9999 (port number to use to connect to the db).
  6. sqlexp testdb -S 9999 -user trending -password trending  (or whatever the user name is for the trending database)
  7. Once at an sqlexp prompt, the SQL statement can be pasted, altered and tested to identify which part of the statement (field) is experiencing the width issue. 
OR 
 
Another way to identify the field with the issue is to access the database:
  1. mpro testdb (if the db is still being served).
  2. In the Procedure editor, go into the Data Dictionary -> Schema ->  Adjust Field Width -> Select the table name that the SQL INSERT statement is loading data into.
  3. Compare the existing field width size for each of the fields to the size of the data that is trying to be inserted into that field via the SQL INSERT statement.
Once the field with the problematic width size is identified, modify the size in the real trend database (ie not the copy we are working with in this article) to accommodate the size of the data being inserted.  See article: 000020504, Character string is to long (8184) when SQL-WIDTH / MAX-WIDTH is smaller than field being updated for additional information on how to change the SQL Width. 
Workaround
Notes
Attachment 
Last Modified Date1/14/2016 10:56 PM
Disclaimer

The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.



Feedback
 
Was this article helpful?

   

Your feedback is appreciated.

Please tell us how we can make this article more useful.



Characters Remaining: 255