Running the Sybase IQ Agent

An agent is a process that runs on a remote machine and acts on behalf of a client. The Sybase IQ Agent, also called the IQ Agent, enables Sybase Central to:

These functions are required by all IQ database administrators. If you have a multiplex database, the IQ Agent must be running on each machine in your multiplex in order to fully administer a remote IQ server. Sybase Central can be running while you start and stop IQ Agents.

This section gives instructions on running the IQ Agent on both UNIX and Windows platforms.


Specifying the host for the IQ Agent on UNIX

When you use scripts to start the IQ Agent, use the the -host parameter to specify the host name explicitly.

To start the agent using the host name returned by uname -n use the optional -host parameter, as follows:

S99SybaseIQAgent12 -host

To start the agent using the host’s alias enter:

S99SybaseIQAgent12 -host <foo>

where foo is an alias present in the /etc/hosts file.


Configuring the IQ Agent to start automatically

Configuring the IQ Agent on UNIX

To enable automatic startup for the IQ Agent, the system administrator must place the following file in the UNIX startup directory (usually /etc/rc*):

$ASDIR/bin/S99SybaseIQAgent12

After you install Sybase IQ and move the file, the IQ Agent starts automatically whenever you reboot your system.

Configuring the Agent on Windows

On Windows systems, the installation program sets up the Agent to start automatically each time you reboot the machine. The filename is:

SybaseIQagent12.exe

Changing the Agent port number

The IQ Agent port number defaults to 1099. You can override the default value, provided that you do so before the plug-in starts. Changing the default port number lets you to run any number of 12.7 IQ Agents on a given host, or run IQ Agents for Sybase IQ 12.5, 12.6, and 12.7 on the same host. Use the ASIQPORT enviornment variable or the -port command line parameter to override the default IQ Agent port number. You can also specify the port per server within Sybase Central, or override the value on the Sybase Central startup command, for example:

scjview -DASIQPORT=3356

Overriding the IQ Agent Port Number

Overriding the IQ Agent Port Number on UNIX

On UNIX, you can override the IQ Agent port number on the startup command line; for example:

 $ASDIR/bin/S99SybaseIQAgent12 -port nnnn

Overriding the IQ Agent Port Number on Windows

On Windows, use the Service Manager, as follows:

  1. Select the name Sybase IQ Agent 12.

  2. Click the Properties icon or choose Action > Properties from the menu bar.

  3. Click Stop under Service status to stop the agent.

  4. In the Start Parameters text box, type -port nnnn where nnnn is the port number.

  5. Click Start to restart the agent.

If the agent fails to start on Windows, check the event log for diagnostic information.


Setting permissions for the IQ Agent

Setting the permissions on UNIX

The S99SybaseIQAgent12 script should be owned by the same UID that is used to run all the servers. Do not use the root user account.

Setting the permissions on Windows

On Windows, you must change the owner of the Sybase IQ Agent. The user who starts the IQ Agent will be the creator and owner of multiplex databases and server directories, and must have write privileges on all of the servers in the multiplex. By default, the System account starts the Agent.

StepsChanging the user

  1. Choose Administrative Tools > Services.

  2. Right-click “Sybase IQ Agent” and choose Start.

  3. On the General tab, choose Automatic for Startup Type.

  4. On the Log On tab, change the Log on as: option from the System Account to This Account.

  5. Type domain\username for an account with the appropriate privileges in the account text box.

    or

    Browse to select an account, then click OK.

  6. Type and reconfirm that account’s password, then click OK.


Troubleshooting IQ Agent startup

Agent startup on UNIX

To check if the Agent is running, run the stop_asiq utility:

stop_asiq -agent
Checking system ... 

The following 1 agent(s) are owned by 'ciaran' 
## Owner PID Started CPU Time Additional Information 
-- --------- ------- -------- -------- ------------------------------------ 1: ciaran 6669 Sep.01 5:11 PORT:1100 java -Diq.agent=/work/sybase127/ASIQ-12_7/java/IQAgent12.jar 
-Di q.agent_log=/ 

-- Do you want to stop the agent displayed above <Y/N>?

Y

This output shows that user ciaran is running the Agent.

Should you ever receive an error that the Agent is not running, change directory to $ASDIR/bin, and type S99SybaseIQAgent12 to restart the Agent.

Agent startup on Windows

If you receive an error message that the Sybase IQ Agent is not running, open the Services utility under Control Panel. If IQ Agent does not have the status “Started,” click Start. Restart Sybase Central after starting the Agent.

IQ Agent Log

If you experience any problems with Sybase Central, check the IQ Agent log file.

On UNIX systems, the file is created in the $ASLOGDIR directory by default, and running $ASDIR/bin/S99SybaseIQAgent12 displays a status line with the log file location.