Configuration procedures on UNIX platforms

To complete Monitor Server configuration on a UNIX platform:

  1. Set the $SYBASE environment variable to the value of the Sybase directory where you installed Adaptive Server and Monitor Server.

  2. 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.

  3. Start Adaptive Server.

  4. 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:

    	AdaptiveServerName.krg
    

    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.

  5. Connect to Adaptive Server using Sybase Central or isql.

  6. 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.

  7. 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.

  8. 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.

  9. (Optional.) Enable non-sa_role monitoring.

    1. 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.

    2. 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
      
    3. Give these user names permission to execute mon_rpc_connect:

      	use master
       	go
       	grant execute on mon_rpc_connect to userName 
       	go
      

      NoteAll user names who want to connect to Monitor Server must have this permission, whether they have sa_role or not.

  10. 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.

    NoteTo 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:

  11. 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:

    1. Update all of the interfaces or sql.ini files used by Monitor Server clients. Use dsedit or dscp. The files must contain entries for:

      • Monitor Server

      • Adaptive Server that you want to monitor

    2. 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.

  12. 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.

  13. 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:

    Some parameter values must match in the Adaptive Server and Monitor Server start-up commands:

  14. 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.