cdr remove trustedhost argument: Remove trusted hosts (SQL administration API)

Use the cdr remove trustedhost argument with the admin() or task() function to remove entries from a database server's trusted-host file.

Syntax

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

>--("--cdr remove trustedhost--","------------------------------>

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

Element Description Key Considerations
localhost_name The localhost name for a database server. If you do not specify a user_name in the command, all entries that include the specified host name are removed.
fully_qualified_domain_name The full domain name for a database server. If you do not specify a user_name in the command, all entries that include the specified fully qualified domain name are removed.
user_name The user account with authority over the database-server instance at the specified host.  

Usage

The cdr remove trustedhost argument removes trusted-host entries from the trusted-host file that is specified by a database server's REMOTE_SERVER_CFG configuration parameter. 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. When you run the admin() or task() function with the cdr remove trustedhost argument on a server in a high-availability cluster, the trusted-host entries are removed from the trusted host files of all cluster servers.

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

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

Example 1: Removing host entries from a trusted-host file

The following command removes a localhost name value and a fully qualified domain name value from the trusted-host file that is specified by the database server's REMOTE_SERVER_CFG configuration parameter:
EXECUTE FUNCTION task("cdr remove trustedhost","myhost1, myhost1.ibm.com");

The myhost1 and myhost1.ibm.com entries from the database server's trusted-host file are removed.

Example 2: Removing host and user entries from a trusted-host file

The following command removes localhost name values, fully qualified domain name values, and user name values from the trusted-host file that is specified by the database server's REMOTE_SERVER_CFG configuration parameter:
EXECUTE FUNCTION task("cdr remove trustedhost",
   "myhost2 john,myhost2.ibm.com john,myhost3 informix,myhost3.ibm.com informix");

The myhost2 with user john, myhost2.ibm.com with user john,myhost3 with user informix, and myhost3.ibm.com with user informix entries from the database server's trusted-host file are removed.


Copyright© 2019 HCL Technologies Limited