SET SERVER command

Use the SET SERVER command to specify the Q Capture server or Q Apply server (also referred to as a target server) to use in the ASNCLP session. After you set a server name, all subsequent commands in the session will apply to this server until you change the server with this command.

Syntax

Read syntax diagramSkip visual syntax diagramSET SERVERCAPTURETARGETREMOTE SOURCETONULLSserver-optionspromote-options
server-options
Read syntax diagramSkip visual syntax diagramDBALIASaliasnameDBNAMEzdbnameNONIBM SERVERremsrvrCONFIG SERVERservernameFILEfilenameother-options
other-options
Read syntax diagramSkip visual syntax diagramIDuseridPASSWORDpwd
promote-options
Read syntax diagramSkip visual syntax diagramPROMOTE TOpromote-srvr-optionsSCHEMApromoteschema
promote-srvr-options
Read syntax diagramSkip visual syntax diagramDBALIASdbalias DBNAMEzdbnameCONFIG SERVERservernameFILEfilename IDidPASSWORDpassword

Parameters

CAPTURE
Specify to set the database as a Q Capture or Classic server.
TARGET
Specify to set the database as a Q Apply server.
REMOTE SOURCE
z/OS®: Specifies the location name of the remote source server when you are configuring the Q Capture program to run at a Db2® log read proxy server. This keyword is required to set the environment for the following commands:
  • CREATE CONTROL TABLES FOR REMOTE SOURCE SERVER
  • DROP CONTROL TABLES ON REMOTE SOURCE SERVER
  • CREATE QSUB, where Q Capture is configured to run as a proxy
NULLS
Specify to set the server name to NULL. This option resets a previously set server name.

server-options:

DBALIAS aliasname
Specifies the database alias name of a z/OS subsystem or Linux®, UNIX, or Windows database as cataloged on the Db2 from which the ASNCLP is invoked.
DBNAME zdbname
z/OS: Specifies the database name.
Note: DBNAME is mandatory when ASNCLP is running on z/OS and the Q Capture or Q Apply server is on z/OS. DBNAME is a location name and is the name by which the Db2 database is known to local Db2 SQL applications. This name must match the name that was entered in the LOCATIONS column of the SYSIBM.LOCATIONS table in the CDB.
NONIBM SERVER
Federated targets: The remote server name for a federated target. The target can be Informix®, Microsoft SQL Server, Oracle, Sybase, or Teradata. This option is only valid for target servers.
CONFIG SERVER servername
Specifies the Classic replication or Oracle source to which the ASNCLP program connects, or the Db2 source if the ASNCLP is running on UNIX System Services for z/OS. The server name must match the bracketed [NAME] field that is entered in the ASNCLP configuration file. You can also use this parameter to identify Db2 targets.
FILE filename
Specifies the complete path and file name to the ASNCLP configuration file. If you do not use the FILE parameter, the ASNCLP program attempts to use the asnservers.ini file in the current directory, if that file exists.
other-options:
ID userid
Specifies the user ID to use to connect to the database.
PASSWORD pwd
Specifies the password to use to connect to the database. If you specify the user ID and do not specify the password, you will be prompted to enter the password. The password is hidden as you type.
Note: This keyword is not valid when the ASNCLP runs natively on z/OS because user authentication is handled through the communication database (CDB).
promote-options:
PROMOTE TO
Promote the specified server definitions.
SCHEMA promoteschema
Specifies the schema under which the server definitions will be promoted. If a schema is not specified, then the schema under which the current server definitions exist is used.
promote-srvr-options:
DBALIAS dbalias
Specifies the database that will receive the promoted server definitions. If this clause is not specified and a PROMOTE command is included in the input file, then the PROMOTE command promotes the definitions to the current server.
DBNAME zdbname
z/OS: Specifies the name of the database subsystem that will receive the promoted definitions.
CONFIG SERVER servername
Specifies the replication target that the ASNCLP program connects to when promoting definitions. The server name must match the bracketed [NAME] field that is entered in the ASNCLP configuration file.
FILE filename
Specifies the complete path and file name to the ASNCLP configuration file. If you do not use the FILE parameter, the ASNCLP program attempts to use the asnservers.ini file in the current directory, if that file exists.
ID id
Specifies the database ID where definitions will be promoted to. If not specified, the ASNCLP output script is generated without ID information.
PASSWORD password
Specifies the password to use to connect to the database. If not specified, the ASNCLP output script is generated without password information.

Example

To set the Q Capture server to the database SAMPLE:
SET SERVER CAPTURE TO DBALIAS SAMPLE;

Example - z/OS

To set the target server to a z/OS database:
SET SERVER TARGET TO DBALIAS PRODUCTION DBNAME PRODUCTIONV9 ID id1 PASSWORD pwd1;

This example sets the z/OS database name to PRODUCTIONV9 and specifies the alias PRODUCTION. The user ID and password are explicitly specified because this command sets up a connection to a remote database.

Example - federated targets

To set the target server to an Oracle database ORACLEDB:
SET SERVER TARGET TO DBALIAS ORADB NONIBM SERVER ORACLEDB;

Example - Classic sources

Given a configuration file called classic.ini that contains the following information:
[classic1]
Type=CLASSIC
Data source=CACSAMP
Host=9.30.155.156
Port=8019
Use the following command to specify server classic1 as the data server:
SET SERVER CAPTURE TO CONFIG SERVER classic1 FILE classic.ini ID id1 PASSWORD pwd1;

Example - password prompting

To set the Capture control server and specify only the user ID in the command:
SET SERVER CAPTURE TO DBALIAS SAMPLE ID DB2ADMIN;
You are prompted to enter the password. If you are running the commands from an input file in batch mode, the program waits for you to enter the password before the program processes the next commands. Your text is hidden when you type.

Example - promoting configurations

To set the existing server containing definitions to be promoted and set the new server that will receive these promoted configurations:
SET SERVER CAPTURE TO DBALIAS SAMPLE ID iD1 PASSWORD "p1wd"
PROMOTE TO DBALIAS SAMPLE1 ID id1 PASSWORD SCHEMA ASN;