728x90
Question

Can we add a DBSERVER entry dynamically to the SQLHOSTS file without bouncing the database server?

Cause

A need exist to add a new connection to the instance dynamically without any down time.

Answer

Starting with Informix version 11.50.xC6 we have the ability to Dynamically Start, Stop and Restart Listen threads with the onmode -P command or by using the SQL Admin API. 

This feature allows a new listener thread to be started on a port without the need to restart the database server. Adding new entries in to the sqlhosts file and the DBSERVERALIAS parameter of the onconfig file and executing the onmode -P or SQL API commands will allow new connections to utilize the new server name.

Steps:


1. Modify the sqlhosts to add the new connection:

      new_test_tcp onsoctcp myhost 4567 

2. Modify the DBSERVERALIAS parameter of the onconfig file: 

      DBSERVERALIASES main_prim_shm:new_test_tcp 

3. Start a listener thread for the new alias:

       onmode -P start new_test_tcp

OR use the sysadmin SQL API :

      execute function admin("start listen","new_test_tcp");


728x90

+ Recent posts