INF: Parameters and Execution Options for SQL Monitor

Last reviewed: April 3, 1997
Article ID: Q90761

The information in this article applies to:

  - Microsoft SQL Server version 4.2 for OS/2

SUMMARY

SQL Monitor is a new facility in SQL Server 4.2 that supports the new SQL Administrator tool. SQL Monitor connects to a SQL Server and performs the following functions:

  • It runs the scheduled backup engine that periodically wakes up and checks to see if there is a backup scheduled. If one is scheduled, the backup engine will dispatch it.
  • It runs the server statistics engine that periodically stores runtime statistics from the SQL Server.

Users do not execute SQL Monitor directly, it supports actions they request through SQL Administrator. The only time SQL Monitor is executed directly is when the system administrator decides how to start it and what startup parameters to specify. This article discusses the options for starting SQL Monitor and its execution parameters.

MORE INFORMATION

The initial state of the backup and statistics engines are set by parameters specified when executing SQL Monitor. Once SQL Monitor has been started, the backup and statistics engines can be independently and dynamically stopped or reconfigured using SQL Administrator. Controlling the backup engine is documented in the Backup and Recovery chapter of the SQL "System Administrator's Guide." Controlling the statistics engine is documented in the Starting and Stopping the Statistics Engine section of the chapter on Configuration and Performance.

SQL Monitor itself cannot be started or stopped from SQL Administrator; it must executed using one of three options. The three options are documented in the section on Starting the SQL Monitor Program in the SQL "System Administrator's Guide." Option 1 below can be used in any network, and is the only option available for non-LAN Manager based networks such as Novell and Banyan. Options 2 and 3 are available only in a LAN Manager or LAN Manager-based networking environment. SQL Monitor must be run on the same machine as the SQL Server it is monitoring.

Option 1

SQL Monitor can be run on any OS/2 machine by invoking it from the command line:

   sqlmontr -parameter1 -parameter2 ....

It is best to start sqlmontr using the OS/2 start command from STARTUP.CMD:

   start sqlmontr -parameter1 -parameter2 .....

This will execute sqlmontr in its own screen session. sqlmontr can then be stopped by terminating that screen session, or by going into the screen session and entering CTRL+C to terminate the process.

The parameters that are valid for this method can be viewed by entering the following command:

   sqlmontr -?

The usage of the parameters shown by -? are:

-P Specifies the password for the sa userid. sqlmontr will prompt

      for the password if -P is not specified.

-S Server name. Never use this parameter, sqlmontr must be on
      the same machine as the SQL Server.

-B Backup sleep period (minutes). The length of time the SQL
      Monitor backup engine will sleep between checks to see if there
      is a scheduled backup to dispatch. The default is 15 minutes.

-A Backup off at startup. This parameter will cause sqlmontr to
      start with the scheduled backup engine not running. The backup
      engine can be started later using SQL Administrator. If -A is not
      specified, sqlmontr will start with the backup engine running.

-M Monitor sleep period (seconds). The length of time the SQL
      Monitor statistics engine sleeps between its attempts to gather
      runtime statistics. The default is 60 seconds.

-N Monitor on at startup. Specifies that you want the SQL Monitor
      statistics engine to be running when sqlmontr starts. If -N is
      not specified, sqlmontr will start with the statistics engine off.
      The statistics engine can be started later using SQL Administrator.

-T Monitor table max row count. The maximum number of rows in the
      statistics engine's table for holding its history of runtime
      statistics. Sqlmontr adds one row to the table each time it gathers
      runtime statistics. If the table fills, sqlmontr will stop
      recording the runtime statistics. The table can then be cleared
      from SQL Administrator. The default is 1000 rows.

-O SQL connect/wait timeout period (seconds). The length of time
      SQL Monitor will wait for a reply to any command it sends to the SQL
      Server before generating a timeout error to SQL Administrator.
      Default is 180 seconds.

Option 2

SQL Monitor can be executed as a LAN Manager Network Service by using the NET START command:

   net start sqlmonitor /parameter1 /parameter2 ....

While the effect of starting SQL Monitor using option 2 is the same as starting it using option 3, option 3 is the recommended method for starting SQL Monitor under LAN Manager, and users should use it instead of option 2. The setup requirements and parameters for option 2 are the same as those needed for option 3. There is a difference between options 2 and 3 if password= is not specified in LANMAN.INI. Issuing "NET START sqlmonitor" will not work unless /password= is specified. If you issue "NETSQL START sqlmonitor" without the /password=, you will be prompted for the password.

Option 3

The recommended way to start SQL Monitor in a LAN Manager Network Service is by using the NETSQL START command:

   netsql start sqlmonitor /parameter1 /parameter2 ....

The advantage this offers over option 2 is that netsql start will do parameter validation, which is not done by the net start command. The advantage options 2 and 3 offer over option 1 is that the SQL Monitor is now a network service and can be reported on and managed by the NETSQL commands documented in the table at the top of page 14 of the "SQL Administrator User's Guide." It can also be managed as a network service by the LAN Manager administrator. If you execute SQLMONTR from the command line in a LAN Manager network, the commands on page 14 will not affect it and the LAN Administrator will not be able to manage SQL Monitor as a network service.

The steps for setting up a system to use either option 2 or 3 are documented on pages 13-14 of the "SQL Administrator for Windows User's Guide." The names of the SQL Monitor parameters used with NET START or NETSQL START are different than the one letter codes used in option 1, but their meanings are the same. The NETSQL START and NET START versions of the parameter names are documented in the table at the bottom of page 14 in the "SQL Administrator User's Guide." Their meanings can be found from the descriptions given above for the corresponding parameters in option 1.


Additional query words: 4.20 WinSQL Administrator
Keywords : kbtool SSrvGen
Version : 4.2
Platform : OS/2


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 3, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.