Informix Dynamic Server backups failing with NetBackup status 6, and Informix SQLCODE -25596

Article:TECH173342  |  Created: 2011-11-01  |  Updated: 2013-10-24  |  Article URL http://www.symantec.com/docs/TECH173342
Article Type
Technical Solution


Environment

Issue



Informix backups are failing with SQLCODE -25596


Error



In the NetBackup 'bphdb' log, are errors similar to the following:

    10/14/2011 16:26:24 - Info bpbrm (pid=1335) starting bphdb on client
    10/14/2011 16:26:24 - Info bphdb (pid=0) Backup started
    10/14/2011 16:26:24 - connecting
    10/14/2011 16:26:24 - connected; connect time: 0:00:00
    10/14/2011 16:26:26 - Info bphdb (pid=0) done. status: 6: the backup failed to back up the requested files

Corresponding errors in the Informix BAR_ACT_LOG:

    2011-10-14 16:26:26 14771  14769 /usr/informix/bin/onbar_d -b -L 0 rootdbs
    2011-10-14 16:26:26 14771  14769 Working with veritas-netbackup as generic storage manager.
    2011-10-14 16:26:26 14771  14769 (-43207) Unable to open connection to database server: could not fork server connection, SQLCODE -25596.
    2011-10-14 16:26:26 14771  14769 /usr/informix/bin/onbar_d complete, returning 130 (0x82)

Environment: Informix Dynamic Server backups using 'onbar' and NetBackup

Cause: "SQLCODE -25596" according to IBM / Informix documentation is:

    -25596 The INFORMIXSERVER value is not listed in the sqlhosts file or the Registry.

    The default database server name that the INFORMIXSERVER environment variable specifies must be a valid database server name in the file
    $INFORMIXDIR/etc/sqlhosts on UNIX or the registry on Windows. Check that the specified server is listed in the sqlhosts file or the registry.


Environment



Informix Dynamic Server backups using 'onbar' and NetBackup


Cause



Usually a "SQLCODE -25596" error indicates that the Informix onbar utility cannot connect to the Informix instance. One of the most common causes for this error is a misconfiguration in one or all of the following three areas:

    * Informix background environment
    * The values in the $INFORMIXDIR/etc/$ONCONFIG file
    * The values in the $INFORMIXDIR/etc/$INFORMIXSQLHOSTS file

Here are some possible examples:

    * The $INFORMIXSERVER environmental variable does not match any value in the $INFORMIXDIR/etc/$INFORMIXSQLHOSTS file
    * The $INFORMIXSERVER environmental variable does not match any DBSERVERNAME or DBSERVERALIAS values in the $INFORMIXDIR/etc/$ONCONFIG file
    * The $INFORMIXDIR/etc/$ONCONFIG file does not exist.


Solution



There are several commands that will allow one to check for these values, such as:

    # onstat -g dis
    IBM Informix Dynamic Server Version 11.50.FC6DE -- On-Line -- Up 00:00:22 -- 208896 Kbytes
    There is 1 server found
    Server        : jupiter
    Server Number : 0
    Server Type   : IDS
    Server Status : Up
    Server Version: IBM Informix Dynamic Server Version 11.50.FC6DE
    Shared Memory : 0xa000000
    INFORMIXDIR   : /opt/informix
    ONCONFIG      : /opt/informix/etc/onconfig.jupiter
    SQLHOSTS      : /opt/informix/etc/sqlhosts.jupiter
    Host          : jupiter
    #

Please check with IBM / Informix support for more commands, and help in solving this error.

Here is an example of how one can encounter this SQLCODE -25596 error using solely Informix commands:

    ## ----------------------------------------------------------------------------------------------------------------
    ## -- Creating an example Informix "stores_demo" database.
    ## ----------------------------------------------------------------------------------------------------------------
    # dbaccessdemo
    DBACCESS  Demonstration Database Installation Script
    Dropping existing stores_demo database ....
    Creating stores_demo database ....
    . . . <SNIP> . . .
    #
    ## ----------------------------------------------------------------------------------------------------------------
    ## -- Showing the current value of $INFORMIXSERVER environmental variable, and a successful query of the "stores_demo" database:
    ## ----------------------------------------------------------------------------------------------------------------
    # echo $INFORMIXSERVER
    jupiter
    #
    # echo 'select count(*) from customer'|dbaccess stores_demo
    Database selected.
          (count(*))
                  28
    1 row(s) retrieved.
    Database closed.
    #
    ## ----------------------------------------------------------------------------------------------------------------
    ## -- Altering the $INFORMIXSERVER value, and encountering a 25596 error:
    ## ----------------------------------------------------------------------------------------------------------------
    # INFORMIXSERVER=saturn;export INFORMIXSERVER;echo $INFORMIXSERVER
    saturn
    #
    # echo 'select count(*) from customer'|dbaccess stores_demo
    25596: The INFORMIXSERVER value is not listed in the sqlhosts file or the Registry.
    #
    ## ----------------------------------------------------------------------------------------------------------------
    ## -- Changing the $INFORMIXSERVER back to its original value, which solves the 25596 error:
    ## ----------------------------------------------------------------------------------------------------------------
    # INFORMIXSERVER=jupiter;export INFORMIXSERVER;echo $INFORMIXSERVER
    jupiter
    #
    # echo 'select count(*) from customer'|dbaccess stores_demo
    Database selected.
          (count(*))
                  28
    1 row(s) retrieved.
    Database closed.
    #





Article URL http://www.symantec.com/docs/TECH173342


Terms of use for this information are found in Legal Notices