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
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:
- 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.
- 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.