This page explains the SQL Adapter in Bridge context. If you were looking for the same information regarding the PAS Designer, refer to SQL Adapter in the Designer guide.

Oops, it seems that you need to place a table or a macro generating a table within the Table Filter macro.

The table is being loaded. Please wait for a bit ...

Error
Database
Possible Reason
Solution
A stored procedure call returning a result set throws the following error in bridgeserver log:
[Error][External][SQLSM][6][Error Message: -1 "Bind variable/parameter 'result' not found". SQL Stored Procedure: ...
allThe return parameter of the stored procedure definition in the UML model has no stereotype <<SQLReturnResultSet>>.Check the stored procedure definition in the UML model and apply the needed stereotype.
For more information see Handling Stored Procedures Returning a Result Set.
Inconsistent data in the database.allYou may have run into the bug described on Bug: Session Commit on Exception: database changes have been committed although an exception occurred during service execution.We recommend strongly updating to Runtime 2018.1.  RUN-2328 has been an important fix.
Read of BLOB fails with error " Can not convert output type (0) of database column '<name of the column>' to internal type 'Blob'".DB2 with ODBCThe xUML Runtime cannot convert the database type to the Bridge type.Add the setting LONGDATACOMPAT=1 to your your DB2 ODBC settings.
Query results have wrong encoding.MySQLOld versions of MySQL may not respect the codepage setting (e.g. UTF-8).
  • Set option CharacterSet=<my codepage setting> on the SQL alias.
  • Update your MySQL database to a newer version.
Error in bridgeserver log:
[... 2006: MySQL server has gone away ...]
MySQLMySQL cannot work on data (commit, execute) because the data exceeds the maximum allowed package size (max_allowed_packet).Increase max_allowed_packet (e.g. to 128 M) on your installation of MySQL.
CLOB is being cut off after 32767 chars when accessing it with the E2E Bridge.OracleThe xUML Runtime cannot convert the database type CLOB to the Bridge type.
  • Set tagged value nativeType=CLOB on the parameter of the stored procedure.
  • Specify the database type for selects and inserts, e.g.
    INSERT INTO TEST_CLOB
    (ID, CDATA)
    VALUES (IN::name, IN:{CLOB}:content )
Error when using Oracle and trying to access a CLOB parameter returned by a stored procedure, e.g. "ORA-24508: Buffer is not aligned correctly."Oracle

Error in bridgeserverlog when requesting database:

  • Read timed out (SocketTimeoutException [...]

  • Level: Error
    Type: E2ERuntime
    Code: C02
    [...]
    Description: Service has a session with an adapter call which runs longer than 30 minutes.

OracleFaulty connection string: use of backslash instead of forward slash.Check the Oracle connection string.
Performance problems: some SQL requests with a WHERE clause are slow. OracleAn existing index that corresponds to the WHERE clause is not used.

This may be a character encoding issue. Please find a more detailed explanation on Oracle: Performance Problems Due to Index Not Used.

When trying to call a stored procedure, you get an error like "HY004 [Microsoft] [ODBC Driver Manager] SQL data type out of range"

Oracle
Caché
Database access encoding problem.Try accessing the database in Unicode/non-Unicode mode (see SQL Deployment).
Encoding problems with special characters, e.g. the German umlauts, using Oracle on a Unix operating system.Oracle on UnixDifferent encoding on database client (Bridge) and database server is used.Set NLS_LANG for your Bridge installation on Unix, see Installing and Configuring Database Access for Oracle.
Error when trying to insert a record containing a datetime field, e.g. "22007 The fractional part of the provided time value overflows the scale of the corresponding SQL Server parameter or column. Increase bScale in DBPARAMBINDINFO or column scale to correct this error.".

SQL Server

SQL Server datetime only supports zero to three digits, ranging from 0 to 999, that represent the fractional seconds.

Truncate the microseconds to three digits.

Error while fetching results: After a commit in a bulk fetch loop the cursor disappears, error Abort was called, and object is in a zombie state is thrown.SQL ServerThe default setting in MS SQL is "Set cursor close on commit on".Create one database session for the bulk fetch and a second database session for the other SQL calls including the commit. Create two aliases, one for each database session.

The SQL handler throws the following error upon executing a database insert:

Bridge error: SQLSM/6
HY104 [Microsoft][ODBC Driver 17 for SQL Server]Invalid precision value
SQL ServerA TEXT or  [N]VARCHAR(MAX) database field contains character data that is too long.
This may occur when using SQLNCLI/ODBC API for SQL Adapter with MS SQL Server.
Define the related fields to be of type CLOB (instead of String) in your service model.

SQL rollback does not work. Error message is something like
6401 "Cannot roll back [...]. No transaction or savepoint of that name was found."

SQL Server
Improper database settings and rollback statement.

Change the following in your database setup:

  • SET XACT_ABORT OFF

Add the following to your rollback statement:

  • IF @@TRANCOUNT > 0
Error when using SQL Adapter with SQLite: "[SQLSM][6][Error Message: 5 "database is locked". SQL Statement: ...]"SQLiteThis occurs, if multiple threads or processes want to read/write the SQLite database simultaneously.
In case of concurrent writes, one write will fail. The xUML Runtime will retry to execute the write for 60 seconds. After the time-out, the message above is written to the bridgeserver log.

There are two possible approaches to solve this conflict (they may also be combined):

  • Add value BusyTimeout=<time in milliseconds> to the tag options of the <<SQLAlias>> . Default is 60000 milliseconds - increase this value (see SQLite Deployment Options).
  • Re-model the service to have short database transactions (including select) and add explicit commits to unlock the database frequently.
  • No labels