When you run aserep and specify a new instance name, it sets up and initializes the ASE Replicator process, as described in “Running the aserep script the first time”.
The aserep script is provided as a shell script (.sh) for UNIX operating systems and a batch file (.bat) for Windows NT and Windows 2000 operating systems.
aserep [ -m host -a ase_port -s server_instance -r rep_port -d ddb_name -u rep_user -p pwd [ -trace ] [ -debug ] [ -c char_set ] [ -admin ] ] | [ -i server_instance ] | [ -x server_instance [ -m host ] [ -a ase_port ] [-r rep_port] [-u rep_user ] [-p pwd ] [ -c char_set ] [ -trace ] [ -debug ] [ -admin ] ] | [-v] [-h]
-m host The name of the host machine on which the primary Adaptive Server resides.
-a ase_port The Adaptive Server client socket port number to which ASE Replicator will connect.
-d ddb_name The name of the Distribution Database.
-u rep_user The user login name of the ASE Replicator system user.
-p pwd The password for the ASE Replicator system user login name. If you do not specify the password at the command line, ASE Replicator prompts you for it.
-r rep_port The ASE Replicator client socket port number.
-c char_set The character set to use when ASE Replicator connects to the Adaptive Server. This parameter is optional. If not specified, ASE Replicator uses the Adaptive Server’s default character set.
-s server_instance The server instance name of the ASE Replicator process. This parameter is optional. If not specified, the default instance name aserep is used. If an existing instance has a name other than the default, you must specify the instance name when you invoke aserep to start that ASE Replicator instance.
-i server_instance The name of the server instance to start. This server instance must already exist and have been initialized. An error results if no such instance exists. If this parameter is specified, ASE Replicator locates the configuration file for this instance and loads startup parameters from the configuration file, including an encrypted password.
-x server_instance The server instance name of the ASE Replicator process for which to change existing configuration parameters. The ASE Replicator server instance name cannot be changed because all the changes are applicable only to an existing instance.
-admin The flag that starts the ASE Replicator instance with all database connections and subscriptions suspended. This parameter is optional.
-trace The flag that starts ASE Replicator with most trace flags enabled. This parameter is optional.
-debug The flag that starts ASE Replicator with debug enabled. This parameter is optional.
-v The flag that returns ASE Replicator software version information. This parameter is optional.
-h The flag that returns a command usage message. This parameter is optional.
To initialize and start an instance of ASE Replicator, you may specify the following set of required parameters:
aserep -m host -a ase_port -s server_instance -r rep_port -d ddb_name -u rep_user -p pwd
These parameters are normally used to start ASE Replicator for the first time. When these parameters are specified, ASE Replicator attempts to initialize. You may also specify the -c char_set, -trace, -debug, and -admin parameters, but these are optional.
If initialization succeeds, a configuration (.cfg) file is written to the directory for the specified server instance. The password is encrypted and stored in the configuration file.
If initialization fails with error messages, you must correct the errors and start ASE Replicator again with the above parameters.
When you invoke aserep with all command line parameters for an existing instance, the configuration (.cfg) file for the instance is backed up as a copy with the .old extension, and a new configuration file is generated.
Once an instance of ASE Replicator has been initialized, it has a configuration file and can be started with the following parameter:
aserep -i server_instance
When this parameter is used, ASE Replicator loads all command-line parameters from the configuration file server_instance.cfg, where server_instance is the specified server instance name. This configuration file is located in the directory for the specified server instance.
If you use the -i server_instance parameter,
no other parameters can be specified at the command line.
You can also start an initialized instance of ASE Replicator with the RUN script, which uses the -i server_instance parameter. For details on the RUN script, see “Using the RUN script”.
To change the parameters of an existing configuration file and start ASE Replicator, use the -x server_instance parameter, followed by the parameter to change the new parameter value. ASE Replicator attempts to start with the new value for the specified parameters. If initialization is successful, the configuration (.cfg) file for the instance is backed up as a copy with the .old extension, and a new configuration file is generated with the new parameter values.
If you specify the -trace, -debug, or -admin flags on the command line with the -x server_instance option, ASE Replicator reverses the values of these flags found in the configuration file for the specified server instance. For example, if -admin is set to true in the configuration file, then the following command resets the -admin setting to false:
aserep -x server_instance -admin
Modify configuration files using the -x server_instance parameter only.
Do not modify the configuration file manually as this may cause unpredictable
results.
aserep -m boulder -a 4100 -s myASERep -r 10001 -d DDB_boulder -u Bob -p p3g5s
This command starts up the ASE Replicator instance myASERep on the host machine named boulder, with Adaptive Server client socket port number 4100, with the Distribution Database named DDB_boulder, with ASE Replicator system user name Bob, with password p3g5s, with ASE Replicator client socket port number 10001, and with the default character set. If initialization succeeds, a configuration file named myASERep.cfg is created in the myASERep instance directory.
aserep -i myASERep
This command loads the myASERep.cfg configuration file for the existing instance myASERep and starts the instance.
aserep -x myASERep -p zY1J0rT
This command changes the password to zY1J0rT in the configuration file for the existing server instance named myASERep. The encrypted password is stored in a configuration file named myASERep.cfg in the myASERep directory. The old configuration file is backed up with the .old extension.
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |