To complete Monitor Server configuration on a UNIX platform:
Set the $SYBASE environment variable to the value of the Sybase directory where you installed Adaptive Server and Monitor Server.
Log in to the UNIX machine using the “sybase” account or another account that has read, write, and search (execute) permissions on the $SYBASE directory.
Start Adaptive Server.
Verify that a valid shared memory file exists.
When you start Adaptive Server, it creates a shared memory file that resides in the $SYBASE directory. A valid shared memory file has a name in this format:
Check that AdaptiveServerName is the entire name, and is not truncated. If AdaptiveServerName is truncated, Monitor Server will not start. See “Restrictions on length of Adaptive Server name” for ways to correct this situation.
Connect to Adaptive Server using Sybase Central or isql.
Change the event buffers per engine configuration parameter using:
sp_configure "event buffers per engine", number
where number is the maximum number of events to be buffered per engine.
The default setting for this parameter is 100, which is not adequate for most sites running Monitor Server. The recommended value for an initial configuration is 2000.
You might need to adjust this value again later. Monitor Server reads event information from these buffers. If this number is too low, event buffer overruns can occur and events can be lost. See “Configuring event buffers” for more information on fine-tuning this parameter.
Change the max SQL text monitored configuration parameter using:
sp_configure "max SQL text monitored", bytes_per_connection
where bytes_per_connection is the maximum number of bytes reserved for each client connection to hold the SQL text of the currently executing batch. Adaptive Server stores the text in reserved buffers in shared memory. Monitor Server obtains the text when asked to do so by one of its clients. SQL text is helpful in tuning long running statements or researching hung processes.
The default setting for this parameter is zero, which does not allow Adaptive Server to buffer any SQL text. The recommended value for an initial configuration is 1024. The theoretical limit is 2,147,483,647, but Adaptive Server immediately rejects very large values because they do not leave enough space for data and procedure cache.
You might need to adjust this value again later. If a connection’s batch text is larger than bytes_per_connection, the text is truncated in the buffer. See “Configuring SQL text buffers” for more information about the SQL text feature.
Stop and restart Adaptive Server, and verify that it started correctly.
This step is necessary to put into effect the new values for the configuration parameters you just changed.
(Optional.) Enable non-sa_role monitoring.
Execute the mon_authorize_non_sa stored procedure, located in the master database. If mon_authorize_non_sa is not in the master database or if it issues an error message indicating that two-phase commit needs to be installed, some steps were omitted during the Adaptive Server and Monitor Server installation process. See the latest release bulletin for Adaptive Server Monitor for specific instructions.
Add user names to the master database.
If a Monitor Server client uses an Adaptive Server login that does not have sa_role, the login must be associated with a user in the master database. Therefore, you probably need to add user names to master. You can either:
Add a user to master for each login that will be a Monitor Server client, or
Add one user to master and associate multiple logins to it through aliases.
To add a user to master, enter:
use master go sp_adduser userName go
Give these user names permission to execute mon_rpc_connect:
use master go grant execute on mon_rpc_connect to userName go
All user names who want to connect to Monitor Server must have this permission, whether they have sa_role or not.
Add connectivity information for Monitor Server.
Sybase client/server connection information can exist in an interfaces file or in a directory service. See the Open Client/Server Configuration Guide for UNIX for more information about any of the following procedures or the dsedit, dscp, dsedit_dce, and dscp_dce utilities.
If you are relying on interfaces files for making client/server connections, you do not need to do anything. The Server Build option in Studio Installer adds the Monitor Server connection information to the interfaces file.
To verify or change the information, use either dsedit (if your system is running X Windows) or dscp (a command-line utility).
If you are relying on a directory service for making client/server connections:
Make sure that the $SYBASE/config/libtcl.cfg file on the machine where Monitor Server was installed points to the appropriate directory service. Use an editor to check and update libtcl.cfg files.
Add Monitor Server to the directory service, using dsedit_dce (if your system is running X Windows) or dscp_dce (a command-line utility). You need to know the Monitor Server name to complete this step.
Configure Monitor Server client machines. This enables clients to connect to Monitor Server. Clients to Monitor Server are users of Historical Server, Monitor Viewer, or other Monitor Client Library applications. Each client machine must be configured appropriately.
If you are relying on interfaces files for making client/server connections:
Update all of the interfaces or sql.ini files used by Monitor Server clients. Use dsedit or dscp. The files must contain entries for:
Adaptive Server that you want to monitor
To add these entries, you must know the:
Adaptive Server and Monitor Server names.
Port numbers or network addresses assigned to these servers when they were configured. If you need to research this information, use dsedit or dscp on the server machine to examine the appropriate interfaces file.
If you are relying on a directory service for making client/server connections, then make sure that the libtcl.cfg file on all Monitor Server client machines points to the appropriate directory service. Use a text editor to check and update libtcl.cfg files on UNIX platforms; use dsedit on Windows platforms.
Add Monitor Server to the Sybase Central machine.
If users intend to connect to Monitor Server by using Monitor Viewer in Sybase Central, add entries for Monitor Server to the sql.ini file on the Sybase Central machine. Use dsedit on the Sybase Central machine to add this entry.
Review the start-up script file. Make sure the parameters are suitable for your site.
The script file contains the Monitor Server start-up command, monserver, and its parameters. A script file ensures that correct start-up parameters are used each time someone starts Monitor Server. The file name is $SYBASE/install/run_monServerName, where $SYBASE is the installation root directory and monServerName is the name used by Studio Installer.
When editing the file:
Do not include a space between an option and its argument.
Do not use carriage returns within the command. Use the standard UNIX continuation character (a backslash) to continue the command on more than one line.
See Table 2-1 for descriptions of the Monitor Server start-up parameters.
Some parameter values must match in the Adaptive Server and Monitor Server start-up commands:
The same shared memory file name must be specified or implied when starting Adaptive Server and Monitor Server. Therefore, the implicit or explicit values of the -M parameter for Adaptive Server and the -m parameter for Monitor Server must match.
The same Adaptive Server name must be specified in both start-up commands. Therefore, the values of the -s parameter for Adaptive Server and the -S parameter for Monitor Server must match. In the Adaptive Server start-up command, the -s option names the Adaptive Server to start. In the Monitor Server start-up command, the -S option names the Adaptive Server to monitor.
Check the permissions on the start-up script file.
The same UNIX account must be used to start Adaptive Server and Monitor Server to ensure appropriate access to shared memory. If necessary, use the chmod command to give the appropriate account execute permission on the new file.
Configuration of the new Monitor Server is now complete. Go to Chapter 3, “Starting, Verifying, and Stopping Monitor Server”, for instructions on starting the server, verifying that it is running correctly, and connecting to it using clients.
Depending on conditions at your site, you might need to adjust the default runtime configuration of Monitor Server. See “Adjusting Monitor Server runtime configuration” for more information.