Retention Policy for Dialogue Manager Database
Introduction
This topics describes how the use the retention policy script to remove Dialogue Manager data older the set time.
Only Text conversation that are processed before the retention date range will be deleted. Text conservations that are still open or that have been re-opened inside the rendition date range will not be deleted.
The Retention Policy script will cleanup the following tables:
-
Session
-
MessageAttachment
-
Attachment
-
Participant
-
Message
-
Conversation
Run Retention Policy script
-
Login to a machine / server with "Azure Data Studio" or "Microsoft SQL Server Management Studio".
-
Connect to the Database engine, where the databases are located.
-
Navigate to the Dialogue Programmability > Stored Procedured
-
Execute the "dbo.usp_Retention" script.
-
Change the Parameter:
-
RetentionDate = The earliest date you would like to keep data in the current database.
-
-
Execute the script.
Alternative: Moving target
If you want to run the retention policy on a recurrent schedule, you need to make the RetentionDate a moving target. This can be done by using the following SQL query:
DECLARE @RC int
DECLARE @RetentionDate date
SET @RetentionDate = GETDATE()-90
EXECUTE @RC = [dbo].[usp_Retention]
@RetentionDate
GO