UPDATE ALTERNATE SERVER FOR DATABASE command

The UPDATE ALTERNATE SERVER FOR DATABASE command updates the alternate server for a database alias in the system database directory.

Scope

This command only affects the database partition on which it is executed.

Authorization

One of the following authorities:

  • SYSADM
  • SYSCTRL

Required connection

None

Command syntax

Read syntax diagramSkip visual syntax diagramUPDATE ALTERNATE SERVER FOR DATABASEDB database-aliasUSINGHOSTNAMEhostnamePORTport-number

Command parameters

DATABASE database-alias
Specifies the alias of the database where the alternate server is to be updated.
HOSTNAME hostname
Specifies a fully qualified host name or the IP address of the node where the alternate server for the database resides.
PORT port-number
Specifies the port number of the alternate server of the database manager instance.

Examples

The following example updates the alternate server for the SAMPLE database using host name montero and port 20396:
   db2 update alternate server for database sample using hostname montero port 20396
The following two examples reset the alternate server for the SAMPLE database:
   db2 update alternate server for database sample using hostname NULL port NULL
or
   db2 update alternate server for database sample using hostname "" port NULL

Usage notes

  • This command is only applied to the system database directory.
  • This command should only be used on a server instance. If it is issued on a client instance, it is ignored and message SQL1889W is returned.
  • If Lightweight Directory Access Protocol (LDAP) support is enabled on the machine on which the command is issued, the alternate server for the database will be automatically registered in the LDAP directory.