IBM Support

How to change the database server instance name or alias

Troubleshooting


Problem

This document explains the procedure to change the IBM Informix database instance name or alias, in Unix systems.

Resolving The Problem


INTRODUCTION

If your operating system is UNIX®, you can change the name or alias of your IBM® Informix Dynamic Server (IDS) database server instance.


STEPS

In the following examples, the old IDS server name old_server_name specified by the ONCONFIG configuration file parameter DBSERVERNAME and the INFORMIXSERVER environment variable is changed to the new IDS server name: new_server_name.

    1. Back up your configuration files (ONCONFIG file, sqlhosts file).

      Example:

      The ONCONFIG configuration file and sqlhosts file to be backed up have these lines:
        ONCONFIG:
          DBSERVERNAME old_server_name
        sqlhosts:
          old_server_name ipcshm   server_hostname  servicename
    2. Stop the database server using onmode -ky.

    3. Edit the ONCONFIG file and replace the name in the DBSERVERNAME or DBSERVERALIASES parameter you want to change to the new instance name or alias.

      Example:

      Change entries in the ONCONFIG file with the renamed server name/alias:
        ONCONFIG:
          DBSERVERNAME new_server_name
    4. Edit the sqlhosts file to replace, at the first column, from the old server name or alias to the new server name or alias.

      Example:

      Change entries in sqlhosts file with the renamed server name/alias:
        sqlhosts:
          new_server_name ipcshm   server_hostname  servicename
    5. At the client level, or during a DBA session, change the environment or user profile that had set the INFORMIXSERVER to the old instance name/alias, to export INFORMIXSERVER environment variable to the new instance name or alias.

      Example:

      Change INFORMIXSERVER environment variable to the new valid Informix server name or alias:
        In UNIX (/bin/ksh):
          $ INFORMIXSERVER= new_server_name
          $ export INFORMIXSERVER
        In Windows:
          set INFORMIXSERVER=new_server_name
    6. Having the environment variable INFORMIXSERVER correctly set to a valid IDS server name or alias, bring the database server back online (using oninit command) and test the connection to the new server name/alias.
      Tip: In the server, you can test the connection by using dbaccess:
        Connection -> Connect
    Then, select the new Informix server name or alias, and enter user name and password.
    7. At the clients side, you need to change the INFORMIXSERVER field used for the connections to replace it to the new server name/alias. Depending on the type of connection (native, ODBC, OLE DB, JDBC), the field may vary. Please, refer to the connection properties for each method in order to have all your clients configuration changed.

    Example:

    All clients are changed properly according to their own connection method. The information to be changed is the IDS server field, so they reflect that they are connecting to another IDs server name/alias.

    Note: For clients using native connections, you will need to change the IDS database server information in: SetNet32 (Windows clients), or sqlhosts file and INFORMIXSERVER (UNIX clients).
[{"Product":{"code":"SSGU8G","label":"Informix Servers"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Not Applicable","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF025","label":"Platform Independent"},{"code":"PF008","label":"DYNIX\/ptx"},{"code":"PF010","label":"HP-UX"},{"code":"PF015","label":"IRIX"},{"code":"PF016","label":"Linux"},{"code":"PF026","label":"Reliant UNIX"},{"code":"PF027","label":"Solaris"}],"Version":"7.2;7.3;9.2;9.3;9.4;10.0","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

More support for:
Informix Servers

Software version:
7.2, 7.3, 9.2, 9.3, 9.4, 10.0

Operating system(s):
AIX, DYNIX/ptx, HP-UX, IRIX, Linux, Reliant UNIX, Solaris

Document number:
335839

Modified date:
16 June 2018

UID

swg21156613

Manage My Notification Subscriptions