![]() | ![]() |
Home |
|
|
Adaptive Server IQ Multiplex User's Guide |
|
| Chapter 4: Running Multiplex Servers |
Chapter 4
This chapter tells how to start and stop servers.
To start and stop IQ multiplex servers interactively, use Sybase Central. To start IQ multiplex servers in scripts, you may use command line parameters. This section describes both startup methods.
You can also configure Windows systems to start an IQ server automatically when the system is booted. For details, see "Installing Adaptive Server IQ as a Service" in Adaptive Server IQ Installation and Configuration Guide.
Make sure that you follow these rules:
Run only one write server against a multiplex database at a time. The write server must always start on the same host with the same server name and catalog (.db) filename.
Query servers can only be run on a multiplex database.
Review and edit the params.cfg file in the database directory for the server before starting it. Remove any -n switch in a params.cfg file used to start a multiplex database. For more about params.cfg, see the following section.
When you create a multiplex server, the Sybase Central Provider creates a params.cfg file that sets options to control server startup. Sybase strongly recommends that you use this file when you start a server, and it is used automatically by Sybase Central. The params.cfg file is located in the database directory for the server. Do not delete it; you must have both a database file (.db) and a params.cfg file in order to start your database. The initial contents of the params.cfg file are copied from the distributed file $ASDIR/scripts/default.cfg.
For example, here is a default.cfg file:
-c 32m -gc 20 -gd all -gl all -gm 10 -gp 4096 -ti 4400
This file sets the startup switches to the recommended defaults shown in the following table.
Switch | Value | Description |
-c | 32MB on 32-bit platforms and 48MB on 64-bit platforms | Catalog Store cache size |
-gc | 20 | Checkpoint interval |
-gd | all | Limits users who can start database to those with certain level of permission |
-gl | all | Limits users who can load or unload tables |
-gm | 10 | Default number of connections |
-gp | 4096 | Catalog Store page size |
-ti | 4400 | Client time-out set to 72 hours (4400 minutes) |
You can modify each params.cfg file to use certain values for each server in the multiplex. For example, to create a server log file named server.out, add the option:
-o server.out
Check the readme.txt file and Adaptive Server IQ Installation and Configuration Guide for your platform for any switches required for your operating system.
See "Rules for running multiplex servers" for multiplex restrictions on params.cfg switches.
Sybase Central is the easiest way to start IQ multiplex servers.
Wizards on the write server (Start Server, Stop Server, and Synchronize) allow you to affect all servers in the multiplex.
To start multiplex servers with Sybase Central:Start Sybase Central as follows:
On UNIX, change directory to $SYBASE/sybcentral, and type
scjviewat the command prompt:
% scjview
On Windows, select Start-->Programs--> Sybase --> Adaptive Server IQ 12-->Sybase Central Java Edition.
Click Adaptive Server IQ to display the Utilities folder.
Open the Utilities folder and run Start Database Server.
If you have run the wizard before, you may check "Use information from last successful startup," to default to whatever you specified last.
Choose whether to start one server or all the servers in the multiplex. For example, before submitting queries in a multiplex, you would generally start all the servers.
Click Next.
The wizard next displays a series of screens prompting you for server information. When starting all of the servers in a multiplex, supply information for the write server.

Check all information carefully. If you start a write server with the wrong port number, the contents of the Multiplex folder will not display.
To change the user name or port number, select it and type over it. The information that you specify on this screen can be used each time you start the database.
If Server Lookup is dimmed, you have not created any server objects. To create server objects, see the instructions in Adaptive Server IQ Installation and Configuration Guide for your platform. Once you create server objects for your servers, the Server Lookup becomes a dropdown list of those servers.
Click Next.
On the next screen, specify the database name and path. The Browse button only works locally.
Click Next.
The next screen summarizes startup settings. Options are listed below the line. They will be highlighted if selected, dimmed if not.
Sybase Central uses the params.cfg file to start the server, and requires that this file exist in the directory where the IQ Catalog (.DB file) resides. You may customize this file for each server.
Click Finish.
Validating the multiplex notifies you of errors that would prevent some or all servers from starting in multiplex mode. See "Validating the multiplex" for instructions.
If errors occur, IQ records them in the server log file, servername.NNN.svrlog where NNN is the number of times the server has been started. On UNIX systems, this log file's location defaults to the $ASDIR/logfiles directory, defined by the environment variable $ASLOGDIR; for example: $ASLOGDIR/fiona.123.svrlog. On Windows systems, the log file default is %ASLOGDIR%.
If you can prefer, specify your own log file name and location by using the -o option in your params.cfg file. See "Startup command examples".
Sybase ASIQ Agent errors are logged in SCAgent.log in the $ASLOGDIR directory (on UNIX) or %ASLOGDIR% directory (on Windows). For more about log and output files, see "Directories and scripts installed ".
When Adaptive Server IQ starts, stops, or synchronizes servers on NT on the same host, it may display one or more DOS command windows. For example, you may see a window titled DBSPAWN.EXE when a new server is spawned in the background. The appearance and disappearance of these windows is normal and requires no action.
Multiplex startup parametersSybase recommends that you start and stop multiplex databases using the Sybase Central interface. If you cannot run Sybase Central, or if you need to start multiplex databases from a script, use the startup commands described in this section instead.
Startup or shutdown operations require multiple commands:
A start_asiq command to start the appropriate server(s).
One or more dbremote command(s) to control communication between the write and query servers. Dbremote is always run on the write server host.
A dbstop or stop_asiq command to stop the server(s).
For a complete list of command line options, see Chapter 2, "The Database Server" in Adaptive Server IQ Reference Manual. You can specify the following multiplex options on the start_asiq command line for managing multiplex databases.
If used improperly, these options can cause problems. Make sure you read the following descriptions and Chapter 5, "Managing the Multiplex Environment" carefully before using the multiplex startup options.
Switch | Description |
-iqmpx_ov 1 | For use starting multiplex databases only. Starts the server with override, to indicate that no other write server is currently running against the same database. This switch is for startup when moving the write server to another host. It overrides safeguards against starting write servers on the wrong host. |
-iqmpx_sn 1 | For use starting multiplex databases only. Starts the write server in single-node operating mode, for certain types of recovery. Query server(s) cannot run while the write server is in single-node mode. |
For help on dbremote options, type:
dbremote -h
The following dbremote options are recommended when running IQ multiplex servers:
Switch | Description |
-k | Closes window when finished. |
-o output_filename | Specifies an output file. |
-q | Runs minimized. |
-v | Specifies verbose output. |
Sybase provides shell scripts in the write server database directory to start dbremote for each server in the multiplex. There is currently no service mechanism to start these processes automatically; this is up to the user. For example, on a Windows system, a DBA may add an entry in the Windows registry so that these processes start as soon as the DBA logs into the system. Note that dbremote is only required for data replication and servers run without it are still viable. Old data versions will not be recovered at the write server when dbremote is running.
The following example starts the server Server02. If it was configured to be a query server, it will come up as a query server automatically.
start_asiq @params.cfg -n Server02 -x "tcpip(port=1234)" mpxdb.db
Then, on the write server's host:
dbremote -c "uid=DBA;pwd=SQL;eng=Server02;links=tcpip{host=ciaran;port=1234};dbf=mpxdb"
-v -o outfile.outFor more examples of startup and dbremote commands, generate the administrative scripts as described in"Creating query servers". Use a text editor to view the commands in the scripts.
Always run dbremote on the write server's host, whether you are starting a query server or the write server. You can customize the administrative scripts to run dbremote. For more information, see "Using administrative shell scripts".
On Windows NT systems, a SQL Remote screen will appear. You can minimize this screen.
Running multiple serversWhen attempting to start a server, you may see the following message:
DBSPAWN ERROR -96 -- database engine already runningThis error indicates that the startup process is finding the shared memory segment of a server started earlier, and is unable to create a shared memory segment. This error may occur when either an Adaptive Server IQ or Adaptive Server Anywhere server is running. (Interactive SQL will also connect to an earlier server if its shared memory port is visible, even if you intended for it to connect to a server started later.) You can avoid the error if you run only one server per system, either Adaptive Server IQ or Adaptive Server Anywhere.
If you run multiple servers per system, Adaptive Server IQ requires that you:
Make sure that each server has a unique name, specified with the -n parameter on startup.
Make sure that each server has a unique port number, specified with the -x parameter.
For examples using these parameters, see page .
If not already connected to a multiplex server, follow the steps in Introduction to Adaptive Server IQ Chapter 3, "Running and Connecting to Servers," section "Connecting to databases."
Left click on the server to show its database.
Left click on the database (mpxdb1 in this example).
Left click on the Multiplex folder. For details about the status icons beside the multiplex server names, see "Checking server status".
Right-click the write server and select Server --> Stop from the dropdown menus.
To stop all servers in the multiplex, click ALL.
Click Finish.
You can stop any server directly connected to the multiplex, as follows.
To stop individual multiplex servers:Click the checkbox beside that server's name on the Stop servers in the Multiplex window. (See the previous procedure.)
Click Finish.
Another way to stop an individual server is to right-click on the query server in the Multiplex folder and select Server --> Stop.
If one of the query servers in your multiplex becomes unavailable due to a hardware crash or other failure, you can start it from the right-click menu for that server.
If you need to start all of the servers in the multiplex, use the Start Server wizard for the write server.The writer's Start Server wizard also starts all dbremote processes for all servers selected.
|
|