Running SQL Executive

SQL Executive is a Windows NT service that resides on the server computer. SQL Executive provides the SQL Server 6.0 scheduling engine, offers robust and varied task scheduling and alerting abilities, and is capable of handling large client/server environments. SQL Executive administration is integrated within SQL Enterprise Manager. Scheduling information is maintained in the msdb database (which is created automatically by setup). For information on using and administering SQL Executive, see the Microsoft SQL Server Administrator's Companion.

SQL Executive can be manually started and stopped in the same manner as SQL Server, by using SQL Service Manager or the Services application in the Control Panel. Use the same procedures provided earlier in this chapter for SQL Server, except those that specify the SQL Executive service rather than the SQL Server (MSSQLServer) service. SQL Executive cannot be paused or continued.

Optionally, SQL Executive can be started automatically when Windows NT starts. You can specify this option during installation using the setup program, or after installation using SQL Enterprise Manager or the Services option in the Control Panel. For SQL Enterprise Manager, use the same procedures described earlier in "Configuring SQL Server for Automatic Startup," but select the Auto Start Executive At Boot Time option.

During installation, SQL Executive should be configured to log on as a service using a special Windows NT user account created for that purpose. For information about this user account, see Chapter 4, Server Installation.

If SQL Executive detects that the MSSQLServer service has stopped unexpectedly, it will automatically attempt up to three times to restart MSSQLServer. This automated restart behavior can be adjusted by modifying values in the Windows NT Registry.

RestartSQLServer specifies whether SQL Executive will attempt to restart the MSSQLServer service once it has been detected as having stopped unexpectedly. Setting this value to 0 prevents automated restart attempts.

MSSQLServer\
SQLExecutive\
RestartSQLServer
Type: REG_DWORD
Value: 0 (false) or 1 (true). The default is 1.

RestartSQLServerInterval specifies, in minutes, the delay between attempts to restart the MSSQLServer service. Changing this value changes the interval between restart attempts.

MSSQLServer\
SQLExecutive\
RestartSQLServerInterval
Type: REG_DWORD
Value: Between 1 and 60 (inclusive). The default is 5.

EventLogPollingPeriod specifies, in seconds, the interval between alert engine polls of the Windows NT applications log (as the alert engine checks for logged SQL Server events).

MSSQLServer\
SQLExecutive\
EventLogPollingPeriod
Type: REG_DWORD
Value: Between 10 and 3600 (inclusive). The default is 20.