cdr add trustedhost argument: Add trusted hosts (SQL administration API)

Use the cdr add trustedhost argument with the admin() or task() function to add trusted-host relationships for database servers in a high-availability cluster or Enterprise Replication domain. For a database to participate in a high-availability cluster or Enterprise Replication domain, its host must be listed in the trusted-host files of the other high-availability or replication servers.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-EXECUTE FUNCTION--+-admin-+---------------------------------->
                     '-task--'   

>--(--"--cdr add trustedhost--","------------------------------->

   .-,------------------------------------------------.      
   V                                                  |      
>----+-localhost_name--+-------------+--------------+-+--"------>
     |                 '- -user_name-'              |        
     '-fully_qualified_domain_name--+-------------+-'        
                                    '- -user_name-'          

>--)--;--------------------------------------------------------><

Element Description Key Considerations
localhost_name The localhost name for a database server.  
fully_qualified_domain_name The full domain name for a database server.  
user_name A user account with authority over the database-server instance at the specified host.  

Usage

The cdr add trustedhost argument with the admin() or task() function adds values to the file that is specified by a database server's REMOTE_SERVER_CFG configuration parameter. If a database server is part of a high-availability cluster, trusted-host information also propagates to the trusted-host files of the other cluster servers. The trusted-host values specify the localhost names or fully qualified domain names for the other database servers in a shard cluster. For added security, you can specify user names that are associated with specific hosts.

If the REMOTE_SERVER_CFG configuration parameter is not set, and you run the SQL administration API task() or admin() function with the cdr add trustedhost argument, the database server performs the following actions:
  1. The REMOTE_SERVER_CFG configuration parameter is set to authfile.DBSERVER.
  2. The authfile.DBSERVER file is created in $INFORMIXDIR/etc.
  3. The specified trusted-host information is added to $INFORMIXDIR/etc/authfile.DBSERVER.

If you run cdr add trustedhost argument with the admin() or task() function on a server in a high-availability cluster, the trusted-host information is added to the trusted-host files of all database servers in the cluster.

You must be a Database Server Administrator (DBSA) to run the admin() or task() function with the cdr add trustedhost argument.

To see the entries in the trusted host file, run the admin() or task() function with the cdr list trustedhost argument.

Example 1: Adding trusted host values to a trusted-host file

The following command adds six trusted-host values to the file specified by database server's REMOTE_SERVER_CFG configuration parameter:
EXECUTE FUNCTION task("cdr add trustedhost","myhost1, myhost1.ibm.com,
   myhost2, myhost2.ibm.com, myhost3, myhost3.ibm.com");

The task specifies localhost names and fully qualified domain names for three database servers.

Example 2: Adding trusted host and trusted user values to a trusted-host file

The following command adds four trusted host and user combinations to the file specified by database server's REMOTE_SERVER_CFG configuration parameter:
EXECUTE FUNCTION task("cdr add trustedhost", "myhost1 informix,
    myhost1.ibm.com informix, myhost2 user_1, myhost2.ibm.com user_1");

The task specifies localhost names, fully qualified domain names, and user names for two database servers.