- Connection does not exist. (SQLCODE=–2)
- String data right truncated. (SQLCODE=1)
- Invalid size of data to bind to a host variable [ Column ID = <A%d>, Data Size = <B%d> , Declared Size of Host Variable = <C%d> ] (SQLCODE=-201144 or -266423)
- Calculation stack overflow (SQLCODE=-135187 or -659475)
- Value overflow or Numeric value out of range (SQLCODE=-135184 or -659472 or -331890)
- Conversion not applicable (SQLCODE=-135180 or -659468)
- Invalid length of the data type (SQLCODE=-135181 or -659469)
- Invalid character value for cast specification (SQLCODE=-331893)
- Invalid cursor state. (SQLCODE=-331822) or Function sequence error (SQLCODE= -331796)
- The cursor must be opened for fetch (SQLCODE=-1) or The cursor does not exist (SQLCODE=-589857)
- Not enough insert values (SQLCODE=-200787)
- The tablespace does not have enough free space (SQLCODE=-69685 or -69923)
- Input literal is not long enough for date format. (SQLCODE=-135218)
- Literals in the input do not match format string. (SQLCODE=-135224)
- The transaction is already active. (SQLCODE=-266311 or -266312)
- The row already exists in a unique index. (SQLCODE=-69720)
- Unable to insert (or update) NULL into NOT NULL column. (SQLCODE=- 200790)
- Indicator variable required but not supplied. (SQLCODE=-331841 or -594101 or 594103)
- Client's query exceeded in the execution time limitation. (SQLCODE=-4164)
- Communication link failure. (SQLCODE=-331843 or -331855)
This chapter describes and summarizes frequently occurring errors identified with SQLCODE and sqlca.sqlerrm.sqlerrmc. There can be two SQLCODEs for the same sqlca.sqlerrm.sqlerrmc. This is because it may be different depending on the location of the module in which the error occurred among the ALTIBASE internal modules. Since the contents of the error are the same, the corrective actions are the same as well.
Connection does not exist. (SQLCODE=–2)
This is the case that the connection object to be used does not exist or disappears during the query processing process. Check whether the connection has been properly processed and in the case of a threaded program, check whether the connection name is properly indicated in the EXEC SQL AT clause.
String data right truncated. (SQLCODE=1)
This is the case when the length of the declared variable is small in the process of storing the value in the variable from the DB. Change the length of the DB variable as large as (data length + 1byte).
Invalid size of data to bind to a host variable [ Column ID = <A%d>, Data Size = <B%d> , Declared Size of Host Variable = <C%d> ] (SQLCODE=-201144 or -266423)
The actual data of (A+1)-th column has the size of B, but the length of the host variable has the size of C. so it occurs when the data value exceeds the length of the variable. Therefore, the length of the variable must be set larger than the length of the data. From time to time, even if the memory of the host variable is broken due to a program error. Therefore, it is recommended to check whether the host variable's memset or memory is broken. Or, in the case of a threaded program, it can also occur when concurrency control is not properly controlled with a single connection for multiple SQL statements.
Calculation stack overflow (SQLCODE=-135187 or -659475)
Value overflow or Numeric value out of range (SQLCODE=-135184 or -659472 or -331890)
Conversion not applicable (SQLCODE=-135180 or -659468)
Additionally, an error may occur when a host variable having a data type that cannot be converted is used in CLOB/BLOB handling
Invalid length of the data type (SQLCODE=-135181 or -659469)
Invalid character value for cast specification (SQLCODE=-331893)
Invalid cursor state. (SQLCODE=-331822) or Function sequence error (SQLCODE= -331796)
This is the case when the order to be followed to use the cursor is not performed properly. Or, this error also occurs when a cursor that has already read all data or a cursor that has been closed and calls to fetch again.
The cursor must be opened for fetch (SQLCODE=-1) or The cursor does not exist (SQLCODE=-589857)
To use a cursor normally, it must be processed with the order of PREPARE -> DECLARE -> OPEN -> FETCH -> CLOSE. This error occurs when an attempt is made to FETCH a cursor that is not normally DECLARE/OPEN.
Not enough insert values (SQLCODE=-200787)
The tablespace does not have enough free space (SQLCODE=-69685 or -69923)
This is the case when there is no space due to the use of all the tablespace capacity during the transaction.
In this case, in the case of the disk tablespace, space must be secured by adding a data file, and in the case of a memory tablespace, available space must be secured by deleting or compacting unnecessary data.
Input literal is not long enough for date format. (SQLCODE=-135218)
Literals in the input do not match format string. (SQLCODE=-135224)
This is the case when the date string entered in the data function and the date format do not match.
The transaction is already active. (SQLCODE=-266311 or -266312)
The row already exists in a unique index. (SQLCODE=-69720)
Unable to insert (or update) NULL into NOT NULL column. (SQLCODE=- 200790)
This is the case when the column is NOT NULL among the data values entered in the INSERT or UPDATE statement, and a NULL value is attempted to be inserted. Tract data values to prevent NULL data from occurring, or change the NOT NULL Constraints of the column properly.
Indicator variable required but not supplied. (SQLCODE=-331841 or -594101 or 594103)
This case is when the value contained in the host variable from the DB is NULL. This error is returned as SQL_SUCCESS_WITH_INFO. That is, it is an error that recognizes that the passed part is NULL. (There is no guarantee that the actual variable will contain any value.)
Client's query exceeded in the execution time limitation. (SQLCODE=-4164)
If the time for executing a query exceeds the specified time, this error is returned for the query.
Check the execution plan of the query described in the document and take necessary tuning measures. Or, if it is due to the amount of data to be processed even though proper measures have already been taken, execute the following query.
EXEC SQL ALTER SESSION SET QUERY_TIMEOUT = 0;
If set to "0", execution continues regardless of the timeout setting for query processing. However, if this has been done, it is recommended that the user make a careful decision to change, as it can occupy a large amount of resources until the query is completed.
Communication link failure. (SQLCODE=-331843 or -331855)
The fetch timeout means that the interval between the DBMS server and the program is limited to 60 seconds. If it exceeds this, the server forcibly disconnects the session.
The UTrans Timeout refers to a case where the interval of time that the user keeps without performing Commit/Rollback after a change transaction occurs is limited to 3600 seconds, and if it exceeds this, the session is disconnected. In both cases, the limit value can be changed as follows.
If it is set to a value of "0", it operates so that the corresponding limit is not applied. However, it is recommended that, as in the case of QUERY_TIMEOUT, the developer must set the above problem at its source, since it will continue to occupy resources within the DBMS, and in some cases, failure can occur as long as the transaction continues.
Network problems such as L4, firewall timeout, etc. may cause the altibase_boot.log to be disconnected without errors. Therefore, the cause must be found with a separate PBT (Problem Tracking) process.