Configuration procedures on Windows NT

To complete Monitor Server configuration on the Windows NT platform:

  1. Start Adaptive Server.

  2. 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 information about correcting this situation.

  3. Use Sybase Central or isql to connect to Adaptive Server.

  4. Change the event buffers per engine configuration parameter:

    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.

  5. Change the max SQL text monitored configuration parameter:

    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. If your Monitor Server users complain of consistently truncated batch text, you might want to make this value larger. See “Configuring SQL text buffers” for more information about SQL text.

  6. Stop and restart Adaptive Server, and verify that it started correctly. You can use Sybase Central to stop and start Adaptive Server if Sybase Central and Adaptive Server are running on the same machine.

    This step is necessary for the configuration parameter changes you made in steps 6 and 7 to take effect.

  7. The Monitor Server process priority must match the process priority of the Adaptive Server being monitored. By default, the Monitor Server process runs at normal priority. If the Adaptive Server runs at a different priority, you must change the priority for Monitor Server.

    To run Monitor Server at high priority, use the -p parameter to the Monitor Server start-up command. To change the Monitor Server priority to any other priority level, use a third-party tool. For example, you can use the Microsoft Visual C++ Process Viewer.

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

    1. Execute mon_authorize_non_sa, located in the master database. If the mon_authorize_non_sa stored procedure 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 the user names permission to execute the mon_rpc_connect stored procedure:

      	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.

  9. Check that the connectivity protocol has a Net-Library driver associated with it.

    Start ocscfg from the Sybase program group. Choose the Net-Library tab. If the protocol you are using has the value <Not Set> for the Net-Library driver, choose a driver from the Net-Lib Drivers drop-down list. For example, associate NLWNSCK with TCP.

  10. Add or adjust connectivity information for Monitor Server.

    Assign a port or network address to Monitor Server to enable client/server connections. Add connection information either to sql.ini files or to a directory service.

    If you are relying on sql.ini files for making client/server connections, then check the server listings in the sql.ini file. For Monitor Server to run, this file must contain entries for:

    Entries for Monitor Server should exist, since the Sybase installation process adds them. Use dsedit to add or change entries to a sql.ini file. To add these entries, you must know the:

    If you are relying on a directory service for making client/server connections:

    See the Open Client/Server Configuration Guide for Desktop Platforms for more information on ocscfg or dsedit. You can start these utilities from the Sybase program group created during installation.

  11. Add connectivity information for clients on client machines.

    This task enables clients to connect to Monitor Server. Clients to Monitor Server are users of Historical Server, Monitor Viewer, and other Monitor Client Library applications. Each client machine must be configured appropriately.

    If you are relying on sql.ini files for making client/server connections, then update all of the sql.ini files used by Monitor Server clients. These must contain entries for both Adaptive Server and Monitor Server. Use dsedit to add entries to a sql.ini file. To add these entries, you must know the following information:

    If you are relying on a directory service for making client/server connections, make sure that the libtcl.cfg file on all Monitor Server client machines points to the appropriate directory service. Use ocscfg to check and update libtcl.cfg files on Windows platforms; use any text editor to do the same on UNIX platforms.

  12. Add Monitor Server to the Sybase Central machine.

    If users intend to connect to Monitor Server by opening monitors 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 Monitor Server start-up parameters inserted into the NT Registry and the start-up .bat file at installation time. Make sure the parameters are suitable for your site.

    See “Changing the default configuration” for instructions on changing the parameters. See “Monitor Server start-up parameters” for a description of the parameters. Some parameters are marked “required.” The ones with default values can be omitted if the default values are acceptable.

  14. (Optional.) Set up the automatic start-up service so that Monitor Server starts automatically each time you log in or reboot. The next section describes procedures for setting up the automatic start-up service.