You are here:

ActiveXperts.com > Support > ActiveXperts SMS Messaging Server > Online > Message Database failover

ActiveXperts SMS Messaging Server Send, receive and automate SMS messages

Quicklinks


SMS Messaging Server - Message Database failover

Introduction

SMS Messaging Server uses a message database to store its SMS- and e-mail messages. SMS Messaging Server uses an MS Access database by default. You can migrate this database to MS SQL or MySQL at any time. The location the message database can be displayed from the SMS Messaging Server Manager:

  • Start the SMS Messaging Server Manager;
  • Click on the 'Configuration' icon in the left view, and click on 'Databases'.
    If you use MS Access, you see a connection string like this:
        Provider=Microsoft.Jet.OLEDB.4.0;Data Source=<AXSMSROOT>\Msg\Messages.mdb
    If you use an MS SQL database, the connection string looks like this:
        Driver={SQL Server};Server=sqlserver01;Database=Messages;Uid=sa;Pwd=<%PASSWORD%>

In case your database stops working, SMS Messaging Server can switch to a secondary - failover - database. This document describes how to switch from one message database to another, by the use of ActiveXperts Network Monitor.

Use ActiveXperts Network Monitor to check the SMS Messaging Server message database

You can use ActiveXperts Network Monitor to check the availability of the SMS Messaging Server message database. It can check connectivity and optionally perform a query on that database. If it can't access the database, it will change SMS Messaging Server's configuration and change the message database connection string.

You must install ActiveXperts Network Monitor on the same server as the SMS Messaging Server. You can download ActiveXperts Network monitor using the following URL:

www.activexperts.com/download/?p1=ax007

Please note that ActiveXperts Network Monitor is shareware. ActiveXperts offers special Network Monitor pricing for existing SMS Messaging Server customers. For details, please send an e-mail to sales@activexperts.com.

Define a check to monitor SMS Messaging Server's message database

After the installation of ActiveXperts Network Monitor, you need to define a new check to monitor SMS Messaging Server. This check is NOT included with the product, but can be downloaded form the ActiveXperts web site.

To download the check, please do the following:

  • Save SmsMessagingServer.vbs in the following directory:
    C:\Program Files\ActiveXperts\Network Monitor\Scripts\Monitor\ (assuming that C:\Program Files\ActiveXperts\Network Monitor\ is the Network Monitor installation directory);

You can now monitor the SMS Messaging Server message database. To define this check, please do the following:

  • From the Network Monitor Manager, choose 'New Monitoring Check (VBScript)' from the 'Monitor' menu, and select 'SmsMessagingServer.vbs' from the 'File' selection box (click here for a screenshot);
  • Click 'OK' to close all dialogs.

The check now monitors accessibility, and notifies you when the database is not accessible. The next paragraph describes how to switch to the secondary (failover) database when the primary fails.

Define an action to switch to the secondary (failover) database

The above paragraph described how to monitor the SMS Messaging Server database. This parapgraph describes how to switch from primary to secondary when the primary fails. It will also switch from secondary to primary if the secondary fails.

  • Save SwitchMessageDatabase.Vbs in the following directory:
    C:\Program Files\ActiveXperts\Network Monitor\Scripts\Action\ (assuming that C:\Program Files\ActiveXperts\Network Monitor\ is the Network Monitor installation directory);
  • Edit the script using Notepad (or another text file editor). Edit line 3,4,5 and 6 to define the message database connection strings. DATABASE1 and PASSWORD1 refer to the primary database, DATABASE2 and PASSWORD2 refer to the secondary (failover) database.
    If you don't know your current connection string to the message database, use the SMS Messaging Server Manager and click on the Configuration->Databases icon on the left pane of the program;
  • Use the Network Monitor Manager, and double-click on the check that you created in the previous paragraph;
  • Select the 'Actions' tab, enable 'Run VBScript when check fails'. The 'Enter program' dialog pops-up;
  • Click on the '...' button, and select 'SwitchMessageDatabase.Vbs' (click here for a screenshot);
  • Click 'OK' to close all dialogs.

The check now monitors accessibility, and notifies you when the database is not accessible. Furthermore, it will swap the connection string from primary connection string to secondary connection string or visa versa.