Feedback
Did this article resolve your question/issue?

   

Article

How to enable Authorized Data Truncation for a JDBC or ODBC connection

« Go Back

Information

 
TitleHow to enable Authorized Data Truncation for a JDBC or ODBC connection
URL NameHow-to-enable-Authorized-Data-Truncation-in-a-JDBC-or-ODBC-connection
Article Number000185291
EnvironmentProduct: OpenEdge
Versions: 11.5.1, 11.6.x, 11.7x, 12.x
OS: All supported Platforms
Other: ODBC/JDBC
Question/Problem Description
How to enable Authorized Data Truncation (ADT) in a JDBC or ODBC connection
How to enable truncateTooLarge in a JDBC or ODBC connection session
How to disable or change ADT for a specific client session when -SQLTruncateTooLarge is enabled for the Database Broker?
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution
To enable Authorized Data Truncation (ADT) for the client session:

Since OpenEdge 11.5.1, the Authorized Data Truncation (ADT) feature can be enabled or disabled for a specific client session via ODBC or JDBC in the connection URL with truncateTooLarge
  • The parameter is connection specific and is remembered by SQL only during the connection session. 
  •  Where:
    • truncateTooLarge=off (data will not be truncated and an error is returned)
    • truncateTooLarge=on (truncates data exceeding the column size)
    • truncateTooLarge=output (truncates only the data returned to the user when its size exceeds the column size)
1.  For ODBC:

ODBC Data Source Administrator tool : DNS
> Advanced > Extended Options: " truncateTooLarge=on " (This is case sensitive)

On Unix, under the respective ODBC DSN in the odbc.ini file:
truncateTooLarge=on
 
2.  For JDBC  

Add the truncateTooLarge parameter to the connection string:
sqlexp -url "jdbc:datadirect:openedge://<IPAddress>:<port>;databasename=<dbname>;truncateTooLarge=output;"

ADT truncateTooLarge Parameter in Connection URL and Autonomous Schema Update (ASU)

In OpenEdge 11.6, the Autonomous Schema Update (ASU) feature can only be enabled by specifying the -SQLWidthUpdate database startup parameter when the Login Broker starts for client connections to the related SQL Server, not for client sessions specifically. For further information refer to Article:
  • When the ASU -SQLWidthUpdate startup parameter is turned ON, ADT (-SQLTruncateTooLarge) is also enabled.
  • The truncateTooLarge parameter in connection URL overrides the ADT server startup parameter (-SQLTruncateTooLarge).
  • For example, If the value of the -SQLWidthUpdate parameter is set to ON when the Database Login Broker was started, when a user connects with truncateTooLarge=off in connection URL, then ADT will be turned off for this connection. While  ASU will be enabled on the SQL Server, ASU is indirectly turned off for this particular connection because there will be no data truncation event (ADT) for the schema update feature to use.
Workaround
Notes
Last Modified Date11/20/2020 6:59 AM
Attachment 
Files
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.