Neverfail for SQL Server: anomalies with filter discovery process in Heartbeat V5.0.1

Follow

Neverfail for SQL Server automatically detects and protects SQL Server data files during Heartbeat installation and at runtime.  The runtime element of this filter discovery process may fail to discover all of the protected files under the following circumstances:

1.  Protected application services are stopped while the filter discovery process runs.

Runtime filter discovery in Neverfail for SQL Server is driven by the 'monitor' command configured in the Application section of the Neverfail Heartbeat Management Client.  This command is scheduled by default to run every 2 minutes.  If the SQL Server service is stopped when the monitor command runs, the monitor command may hang indefinitely, and not run when invoked subsequently by Neverfail Heartbeat.

The 'SQL Server service' is defined as one or more of the following, depending on the configuration of your installation of SQL Server:

  • SQL Server 2000 or MSDE 2000, default instance:  MSSQLSERVER
  • SQL Server 2000 or MSDE 2000, named instance:  MSSQL$<instance>
  • SQL Server 2005 or SQL Server 2005 Express, default instance:  SQL Server (MSSQLSERVER)
  • SQL Server 2005 or SQL Server 2005 Express, named instance:  SQL Server (<Instance>)

Normally, this situation will not arise because, when Neverfail Heartbeat is running, all of the protected application services will also be running.  In addition to this, if any protected service is stopped, the Neverfail Application Module Monitor Service will attempt to restart it within a 2-minute period.

Neverfail do not recommend shutting down the protected application services independently of Neverfail Heartbeat itself (for example, via SQL Server Enterprise Manager / Management Studio, or via the Windows Service Control Manager or SCM).  If you wish to stop the protected application, you should do so via the Neverfail Heartbeat Management Client, using one of the following procedures:

1.1  Shutting down all the protected application services by stopping Heartbeat replication.

If you only have Neverfail for SQL Server, this procedure will stop the protected SQL Server services.  If you have other protected applications, this procedure will stop the services for all of them.

  • Open the Neverfail Heartbeat Management Client
  • On the System > Status & Control tab, click 'Stop Replicating'.
  • On the Stop Neverfail Heartbeat dialog box, select 'Stop Neverfail Heartbeat and all protected applications' and click 'OK'.  The Stopping Replication window will appear, reporting progress of the Stop Replication operation.  When the windows title changes to 'Stopped Replication', the operation is complete.  Click 'Close' to dismiss the window.
  • To start the protected application services again, click 'Start Replicating'.

NOTE:  Stopping and starting the protected application by this method will result in a Full System Check task being triggered when replication starts.

1.2  Shutting down all the protected application services by shutting down Neverfail Heartbeat.

If you only have Neverfail for SQL Server, this procedure will stop the protected SQL Server services.  If you have other protected applications, this procedure will stop the services for all of them.

  • Open the Neverfail Heartbeat Management Client
  • On the System > Status & Control tab, click 'Shutdown'.
  • On the Exit Neverfail Heartbeat dialog box, select 'Exit Neverfail Heartbeat and stop all protected applications' and click 'OK'.  The Neverfail Heartbeat Management Client and Server Pairs Overview window will close automatically while Heartbeat is shutting down.
  • On the ACTIVE server, open the Windows Service Control Manager (SCM).  Wait until all of the protected SQL Server services have stopped.
  • To start the protected application services again, start Neverfail Heartbeat on both servers.

NOTE:  Stopping and starting the protected application by this method will result in a Full System Check task being triggered when Neverfail Heartbeat starts.

1.3  Shutting down the protected application services for SQL Server via the Application Manager.

  • On the ACTIVE server, open the Windows Service Control Manager (SCM).  Select the Neverfail Application Module Monitor Service and stop it.
  • Open the Neverfail Heartbeat Management Client, and navigate to the Application panel.
  • On the Application > Start / Stop tab, expand the 'Neverfail Server' node and highlight the 'SQLServer' node.
  • To stop all of the SQL Server services, click 'Stop'.  This will also stop the scheduled monitor command which handles runtime filter discovery.
  • To start all of the SQL Server services, click 'Start'.  This will also start the scheduled monitor command which handles runtime filter discovery.
  • On the ACTIVE server, open the Windows SCM again.  Select the Neverfail Application Module Monitor Service and start it.

NOTE:  Stopping and starting the protected application by this method will NOT result in a Full System Check task being triggered when Neverfail Heartbeat starts.  This is by design - replication (and synchronization) can continue safely while the protected application services are stopped, and the protected files will remain synch.

1.4  Shutting down all the protected application services via the Application Manager.

  • On the ACTIVE server, open the Windows Service Control Manager (SCM).  Select the Neverfail Application Module Monitor Service and stop it.
  • Open the Neverfail Heartbeat Management Client, and navigate to the Application panel.
  • On the Application > Start / Stop tab, highlight the 'Neverfail Server' node.
  • To stop all of the protected application services, click 'Stop'.  This will also stop the scheduled monitor commands which handle runtime filter discovery.
  • To start all of the SQL Server services, click 'Start'.  This will also start the scheduled monitor commands which handle runtime filter discovery.
  • On the ACTIVE server, open the Windows SCM again.  Select the Neverfail Application Module Monitor Service and start it.

NOTE:  As with 1.3 above, stopping and starting the protected application by this method will NOT result in a Full System Check task being triggered when Neverfail Heartbeat starts.

2.  Runtime filter discovery may not work for SQL Server 2005 Express Edition.

In rare cases, runtime filter discovery may not operate successfully for SQL Server 2005 Express Edition.  Filter discovery during Neverfail heartbeat installation will still succeed, creating the correct filter set, so this issue will only affect your installation of Neverfail for SQL Server if:

  • You are protecting SQL Server 2005 Express Edition
  • You need to add additional SQL Server databases after Neverfail Heartbeat is installed
  • The new database files are placed in alocation which is not already protected by an existing file filter

This combination of circumstances is uncommon; and, in such cases, you still have the option to manually configure filters to protect any SQL Server databases you create.  If you need to do this, please contact your Neverfail Support representative for instructions on what filters to set and how to configure them.

3.  How to identify if the filter discovery process has hung.

Under normal circumstances, as previously noted, the filter discovery process for the SQL Server Application Module (AM) runs at regular intervals.  By default, this interval is 2 minutes.  Each time the process runs, the monitor command records three lines of output, regardless of whether or not new filters are set.  To see the output, do the following:

  • Open the Neverfail Heartbeat Management Client, and navigate to the Application panel.
  • On the Application > Status tab, expand the 'Neverfail Server' node and the 'SQLServer' node
  • Select the 'monitor' node.

In the 'Status Log' pane, the monitor command output is shown.  For each successful run of the command, you will see output of the following form:

  • dd/mm/yy hh:mm:ss [SQLServer : monitor]      Executing
  • dd/mm/yy hh:mm:ss [SQLServer : monitor]      Script Finished exit code : 0
  • dd/mm/yy hh:mm:ss [SQLServer : monitor]      Finished

If the status is shown as 'Executing' for longer than the poll time of the monitor command (by default, 120 seconds), the command may have hung.  In this case, the following recovery steps may be followed:

  • Select the Application > Start / Stop tab.  The 'monitor' node should still be highlighted.
  • Click 'Terminate'

Once the 'monitor' command has terminated successfully, you should see the following in the 'Status Log' pane:

  • dd/mm/yy hh:mm:ss [SQLServer : monitor]      Script terminated cscript //NoLogo <path to executable>

It should now be possible to restart the filter discovery process, as follows:

  • Select the 'SQLServer' node
  • Click 'Monitor'.  This should restart the filter discovery process, which will continue to execute thereafter at the configured interval.

If you have any problems with this process, please contact your Neverfail Support representative.

KBID-802

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.