Determine features of the database server

You can check on features of the database server after you execute one of the following SQL statements.
  • CONNECT
  • CREATE DATABASE
  • DATABASE
  • SET CONNECTION
When the database server establishes a connection with one of these statements, it can obtain the following information about the database server:
  • Is a long identifier or long user name truncated?
  • Does the open database use a transaction log?
  • Is the open database an ANSI-compliant database?
  • What is the database server name?
  • Does the database store the FLOAT data type in DECIMAL form (done when the host system lacks support for FLOAT types)?
  • Is the database server in secondary mode? (If the database server is in secondary mode, it is a secondary server in a data-replication pair and is available only for read operations.)
Does the value of the DB_LOCALE environment variable set by the client application match the value of the database locale of the open database? The following table summarizes the values that the SQLSTATE variable and the sqlca structure take to indicate these conditions.
Database feature SQLSTATE value sqlca value
Long identifier or long username has truncated "01004" sqlca.sqlwarn.sqlwarn1 is 'W'
Database has transactions "01I01" sqlca.sqlwarn.sqlwarn1 is 'W'
Database is ANSI compliant "01I03" sqlca.sqlwarn.sqlwarn2 is 'W'
The database server is not an obsolete product "01I04" sqlca.sqlwarn.sqlwarn3 is 'W'
FLOAT represented as DECIMAL "01I05" sqlca.sqlwarn.sqlwarn4 is 'W'
Database server in secondary mode "01I06" sqlca.sqlwarn.sqlwarn6 is 'W'
Mismatched database locales undefined sqlca.sqlwarn.sqlwarn7 is 'W'

The SQLSTATE variable might return multiple exceptions after these connection statements. For more information about the SQLSTATE variable and the sqlca structure, see Exception handling.