Sample configuration of stored procedures for Microsoft™ SQL Server
Use the following guidelines when you configure stored procedures for the Microsoft™ SQL Server database.
Guidelines for configuring stored procedures
- Use the SQL Server Agent to create new jobs for each stored procedure.
- Schedule the jobs to run at least daily. You must schedule sp_runid to run at least 10 minutes before the other scripts.
- For each job in the SQL Server Agent interface, you must specify the step type as Transact-SQL script (T-SQL) and select the Unica Campaign database.
Example for creating a run identifier
The following example shows how to create a run identifier.
DECLARE @return_value int
EXEC @return_value = [dbo].[SP_RUNID]
SELECT 'Return Value' = @return_value
GO
Example for processing email contact data
The following example shows how to process email contact data. Schedule the job to run at least 10 minutes after the job that generates the run identifier.
DECLARE @return_value int
EXEC @return_value = [dbo].[SP_POPULATE_MAILING_CONTACTS]
SELECT 'Return Value' = @return_value
GO
Example for processing email response data
The following example shows how to process email response data. Schedule the job to run at least 10 minutes after the job that generates the run identifier.
DECLARE @return_value int
EXEC @return_value = [dbo].[SP_POPULATE_MAILING_RESPONSES]
SELECT 'Return Value' = @return_value
GO
Example for processing SMS contact data
The following example shows how to process SMS contact data.
DECLARE @return_value int
EXEC @return_value = [dbo].[SP_POPULATE_SMS_CONTACTS]
SELECT 'Return Value' = @return_value
GO
Example for processing SMS response data
The following example shows how to process SMS response data.
DECLARE @return_value int
EXEC @return_value = [dbo].[SP_POPULATE_SMS_RESPONSES]
SELECT 'Return Value' = @return_value
GO
Example for processing WhatsApp contact data
The following example shows how to process WhatsApp contact data.
DECLARE @return_value int
EXEC @return_value = [dbo].[SP_POPULATE_WHTSAPP_CONTACTS]
SELECT 'Return Value' = @return_value
GO
Example for processing WhatsApp response data
The following example shows how to process WhatsApp response data.
DECLARE @return_value int
EXEC @return_value = [dbo].[SP_POPULATE_WHTSAPP_RESPONSES]
SELECT 'Return Value' = @return_value
GO
Example for processing Mobile response data
The following example shows how to process Mobile response data.
DECLARE @return_value int
EXEC @return_value = [dbo].[SP_POPULATE_MOBILE_RESPONSES]
SELECT 'Return Value' = @return_value
GO