The syncsqlhosts utility
Use the syncsqlhosts utility to manually convert the connection information between the sqlhosts file format and the Windows™ registry format.
Syntax
Command options
Option | Purpose | Key considerations |
---|---|---|
-source sqlhostvalue | Specifies the source machine to copy connection information from. sqlhostvalue is either a \\machine name or an sqlhosts file. | If you do not specify a -source option, the local registry is used. |
-target sqlhostvalue | Specifies the target machine to copy connection information to. sqlhostvalue is either a \\machine name or an sqlhosts file. | If you do not specify a -target option, the local registry is used. |
-servers serverlist | Specifies the servers to copy connection information from. serverlist is a list of HCL OneDB™ Server entries that are separated by spaces that are copied from the source to the target machine. | If you do not specify a -servers option, all of the defined connections are copied. |
Usage
The following prerequisites must be
met to run this command:
- The user must have the appropriate authorization to read or write files on the source and target system and registry.
- If the specified value for a parameter contains a space, you must enclose that value in double quotation marks (").
Examples of syncsqlhosts utility usage
In
the following examples, you are issuing commands from a machine named
machine1.
- To copy the connection information from the registry on machine2
to the registry on machine1:
syncsqlhosts -source \\machine2
- To copy the connection information from the registry on machine1
to the registry on machine3:
syncsqlhosts -source \\machine1 -target \\machine3
- To copy connection information from the registry on machine2 about
servers ol_server1 and ol_server1test to the registry on machine1:
syncsqlhosts -source \\machine2 -servers ol_server1 ol_server1test
- To copy connection information from the registry on machine2 about
servers ol_server1 and ol_server1test to a file on machine1:
syncsqlhosts -source \\machine2 -target c:\informix\etc\sqlhosts.ol_machine2 -servers ol_machine1 ol_machine1test