This article refers to the Barracuda PST Enterprise version 2.2.0.1242 or higher.
You may want to automatically apply a default policy to PSTs if:
- PSTs are found connected in an Outlook profile; and/or
- PSTs are found not connected to an Outlook profile (files on the file system-only).
To automatically apply a default policy, you can define a database trigger.
Define Database Trigger
Use the following steps to add an INSTEAD OF INSERT type trigger:
- Open SQL Management Studio, and connect to the SQL instance, typically (in SQL Express), PSTENTERPRISE.
- Open the PSTEnterprise database hierarchy and browse to Databases > PSTEnterprise > Tables.
- Right-click dbo.PSTPolicyDefinition, and click Select Top 100 Rows:
- In the Results tab, identify and note the policy ID you wish to assign by default:
- In SQL Management Studio, click New Query. Paste the appropriate SQL statement for your PST Enterprise version in the SQL STATEMENT.
SQL Statement, version 2.2.x
SQL Statement, version 2.4:
SQL Statement, version 3.0 and higher:
- Edit the statement as follows:
- Locate the line SET @policyid = 1; and replace the ID number with correct ID value for the Policy you want assigned as default.
- Edit the WHERE clause in the third line from the bottom to match your requirements of what type of PSTs the default policy applies to. For example,
WHERE ID = @maxid AND [Source] = ‘FoundAttached’
/***** for just PSTs that are found connected in an Outlook profile *****/WHERE ID = @maxid AND [Source] <> ‘FoundAttached’
/***** for just PSTs that are found not connected in an Outlook profile *****/WHERE ID = @maxid
/***** for all PSTs regardless of how they are found. *****/
- Execute the script.
- Use some sample PST files to confirm the script is operating as expected.
- To remove the trigger, execute the following query:
USE [PSTEnterprise]
GO
DROP TRIGGER [dbo].[assigndefaultpolicy]