Troubleshooting
Problem
You are trapping for syntax errors (SQL -201). You execute the CREATE DISTINCT TYPE statement or the CREATE DATABASE statement. The engine traps on a -201 error, indicating a problem with SQL syntax, but there are no syntax errors in the statement.
Symptom
You set a trap for a syntax error on your instance with the following command:
- onmode -I 201
You execute the CREATE DISTINCT TYPE statement. The online log shows there is an assert failure and an assert fail file is created. However, the SQL statement succeeds and the -201 error is not printed to the computer terminal.
You are using IDS 11.5 or a later version. You experience the same problem executing CREATE DATABASE.
You can determine the problem by examining the data for the failed session in the assertion failure file. Expect to see the information as follows, depending on which SQL statement generates the assertion:
The failed session data in the assertion failure file shows CREATE DISTINCT TYPE in the SQL Stmt type field and -201 in the SQL ERR field. The SQL statement data shows your statement and a CREATE DOMAIN statement:
Current SQL statement :
- create distinct type mytype as int
Last parsed SQL statement :
create domain tmpdom mytype
The failed session data in the assertion failure file shows CREATE DISTINCT TYPE in the SQL Stmt type field and -201 in the SQL ERR field. The SQL statement data shows the following statements:
- Current SQL statement :
create distinct type informix.IDSSECURITYLABEL as varchar(128);
Last parsed SQL statement :
create domain tmpdom idssecuritylabel
Cause
The product is working as designed.
Resolving The Problem
The CREATE DATABASE statement succeeds and the CREATE DISTINCT TYPE statement succeeds. The trap on -201 also traps if there is a genuine syntax error on the statement, in which case a message with the -201 error is printed to the terminal and the SQL statement fails.
Note: Enabling AFDEBUG (setting AFDEBUG to 1) causes the engine to hang on an assertion failure. This will also occur on the unexpected -201 traps described in the preceeding paragraphs.
Related Information
Was this topic helpful?
Document Information
Modified date:
29 September 2018
UID
swg21375543