Sybase agent functions

The agent for Sybase starts a Sybase ASE dataserver, monitors the server processes, shuts down the server, and restarts the server processes..

The Sybase agent is IMF-aware.

Table: Sybase agent functions lists the Sybase agent for SQL server functions.

Table: Sybase agent functions

Agent function

Description

Online

Starts the Sybase ASE dataserver by using the following command.

startserver -f $SYBASE/$SYBASE_ASE/install/
RUN_$Server

where $Server is the instance_name, and $SYBASE/$SYBASE_ASE/install/RUN_$Server is the default location of the Run server file. If you specify the value of the Run_ServerFile attribute, then the value that you specify is used instead of the default location.

If the WaitForRecovery attribute is enabled, the agent waits either till recovery has been completed and all databases that can be made online are brought online. The agent queries the recovery status by connecting to the isql session. The OnlineTimeout attribute must be set to a sufficiently large value so that the recovery completes before the OnlineTimeout is reached.

By default, the WaitForRecovery attribute is not enabled.

If the interfaces file location is specified using the interfaces_File attribute, agent uses [-I interfaces file] option while connecting to the isql session.

When DelayAfterOnline attribute is set, the monitor function is invoked after completion of online function, and after the number of seconds specified in DelayAfterOnline attribute have elapsed.

Monitor

In the basic monitoring mode, agent scans the process table for the dataserver process. In the detail monitoring mode, agent runs the script that is specified in MonScript as an option.

See Monitoring options for the Sybase agent.

Offline

Stops the Sybase SQL server by using the isql command in the following manner.

If interfaces file location is specified using the interfaces_File attribute, agent uses the specified file while connecting to isql session.

The agent first executes the shutdown with wait command.

Sybase agent uses the timeout option during shutdown of Sybase dataserver if this option is supported.

For Sybase ASE Enterprise edition the timeout option for shutdown command is supported for versions 12.5.4 and 15.0.2 onwards. If this timeout option is not supported for Sybase ASE Enterprise edition, the offline script waits in a loop till the dataserver completely stops. The agent waits for up to the OfflineTimeout duration. If the process is still running, the offline script issues a shutdown with nowait command.

When DelayAfterOffline attribute is set, the monitor function is invoked after completion of offline function and after the number of seconds specified in DelayAfterOffline attribute have elapsed.

imf_init

Initializes the agent to interface with the AMF kernel driver, which is the IMF notification module for Sybase agent. This function runs when the agent starts up.

imf_register

Registers or unregisters resource entities with the AMF kernel module. This function runs for each resource after the resource goes into steady state (online or offline).

imf_getnotification

Gets notification about resource state changes. This function runs after the agent initializes with the AMF kernel module. This function continuously waits for notification and takes action on the resource upon notification.

Clean

Forcefully stops the Sybase SQL server by using the isql command in the following manner.

The agent first executes the shutdown with wait command.

For Sybase ASE Enterprise edition, if the isql command fails, the clean script executes the shutdown with nowait command. If the process does not respond to the shutdown command, the agent kills the Sybase dataserver process.

Action

Performs the predefined actions on a resource.

See Action function for the VCS agent for Sybase.