ℹ️ The Auron SMS Server is now Auron Omni. Learn more here.

How can we help?

Enable immediate processing


With Auron Omni you can send messages by inserting new records into the database. You do this by using any of the Insert.. views.

After inserting a message, it is sent automatically. The time between inserting and sending depends on the poll time, which is the Outgoing interval configured in the server options.

This page describes how to force Auron Omni to send a message immediately after inserting it.

Note: This does not apply when sending messages from SQL triggers. These messages are always processed immediately.

Requirements

This method only works if:

  • The database is installed on the same server as Auron Omni.
  • The database server runs the Auron Omni client configuration type.

Database settings

This approach uses the notification API from the local API, so you need to enable OLE (ActiveX / COM).

You can read more about the notification API and the notification broker in the introduction to immediate processing and sending.

Enable OLE in your database by running these commands in the Auron Omni database:

USE SmsServer -- Change to the Auron Omni database name
GO
sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
sp_configure 'Ole Automation Procedures', 1;
GO
RECONFIGURE;
GO

Stored procedure

Next, create a stored procedure called usp_NotifyStatusUpdate.

Run the following script on your database:

USE SmsServer -- Change to the Auron Omni database name
GO

/*
  Calls NotifyStatusUpdate on the MessageDB object.
*/
CREATE PROCEDURE usp_NotifyStatusUpdate
AS
BEGIN
  DECLARE @hr INT
  DECLARE @objMessageDB INT
  DECLARE @src VARCHAR(255), @desc VARCHAR(255);

  EXECUTE @hr = sp_OACreate 'AxMmServer.MessageDB', @objMessageDB OUT
  IF @hr <> 0
  BEGIN
    EXEC sp_OAGetErrorInfo @objMessageDB, @src OUT, @desc OUT
    RAISERROR('Error creating AxMmServer.MessageDB 0x%x, %s, %s',16,1, @hr, @src, @desc)
    RETURN
  END

  EXECUTE @hr = sp_OAMethod @objMessageDB, 'NotifyStatusUpdate', NULL, ''
  IF @hr <> 0
  BEGIN
    EXEC sp_OAGetErrorInfo @objMessageDB, @src OUT, @desc OUT
    RAISERROR('Error calling NotifyStatusUpdate 0x%x, %s, %s',16,1, @hr, @src, @desc)
    RETURN
  END

  EXECUTE sp_OADestroy @objMessageDB
END
GO

You can use this stored procedure to force processing of new messages. This causes any new messages to be sent immediately.

How to use

Simply execute:

EXECUTE SmsServer.dbo.usp_NotifyStatusUpdate

This sends a push to Auron Omni to pick up any new messages.

If you are inserting a batch of new messages, call this stored procedure only once after the batch is created.

We do not recommend calling this stored procedure from an insert trigger.