ADD CONTACT command using the ADMIN_CMD procedure

The ADD CONTACT command adds a contact to the contact list which can be either defined locally on the system or in a global list. Contacts are users to whom processes such as the Scheduler and Health Monitor send messages.

The setting of the Database Administration Server (DAS) contact_host configuration parameter determines whether the list is local or global.

Authorization

None

Required connection

Database. The DAS must be running.

Command syntax

Read syntax diagramSkip visual syntax diagramADD CONTACTnameTYPEEMAILPAGEMAXIMUM PAGE LENGTHMAX LENpg-lengthADDRESSrecipients addressDESCRIPTIONcontact description

Command parameters

ADD CONTACT name
The name of the contact that will be added. By default the contact will be added in the local system, unless the Db2® administration server configuration parameter contact_host points to another system.
TYPE
Method of contact, which must be one of the following two:
EMAIL
This contact wants to be notified by email at (ADDRESS).
PAGE
This contact wants to be notified by a page sent to ADDRESS.
MAXIMUM PAGE LENGTH pg-length
If the paging service has a message-length restriction, it is specified here in characters.
The notification system uses the SMTP protocol to send the notification to the mail server specified by the Db2 Administration Server configuration parameter smtp_server. It is the responsibility of the SMTP server to send the email or call the pager.
ADDRESS recipients-address
The SMTP mailbox address of the recipient. For example, joe@somewhere.org. The smtp_server DAS configuration parameter must be set to the name of the SMTP server.
DESCRIPTION contact description
A textual description of the contact. This has a maximum length of 128 characters.

Example

Add a contact for user 'testuser' with email address 'testuser@test.com'.
CALL SYSPROC.ADMIN_CMD
   ('ADD CONTACT testuser TYPE EMAIL ADDRESS testuser@test.com')

Usage notes

The DAS must have been created and be running.

Command execution status is returned in the SQLCA resulting from the CALL statement.