SAP Knowledge Base Article - Preview

2073041 - When specify statement to arguments may return a wrong exit code - SAP IQ

Symptom

    • When you have specified the sql statement to arguments of Interactivce SQL(dbisql), dbisql is run 2 times a connection process.
  • When the second connection is successful, dbisql returns an exit code of 1st connection.

ex: dbisql -c 'uid=dba;pwd=sql;eng=iqdemo' -nogui 'select @@servername'

  • For example, if the IQ server is down at startup dbisql, dbisql returns a connection error:

Could not connect to the database.
Database server not found
SQLCODE=-100, ODBC 3 State="08001"

  • Then, when the IQ server has been started upon reconnection, dbisql a successful execution of SQL statement:

Reconnected to database.
@@servername                                                                    
--------------------------------------------------------------------------------
iqdemo                                                                 
    
(1 rows)
    
Execution time: 0.14 seconds

dbisql was successfully connected to the IQ server.

  • However, exit code of dbisql is 9 (Unable to connect).

> echo $?
9


Read more...

Environment

  • SAP IQ 15.2 and later
  • SAP IQ 16.0

Product

SAP IQ 16.0 ; SAP SQL Anywhere 16.0 ; SAP Sybase IQ 15.2 ; SAP Sybase IQ 15.4 ; SAP Sybase RAP 5.0 ; SAP Sybase SQL Anywhere 12.0

Keywords

CR771329, 771329 , KBA , BC-SYB-IQ , Sybase IQ , Bug Filed

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.