To change the compatibility mode:
- Launch the MS SQL studio.
- Right-click on the vRA Database.
- Select Properties > Options > Compatibility Level.
- Change the mode to SQL Server 2014(120).
Note:
Alternatively, the compatibility mode can be changed by running the following SQL command:
ALTER DATABASE vra SET COMPATIBILITY_LEVEL = 120
The error messages should stop after making this change.
To truncate the DynamicOps.Tracking.TrackingLogItems table:
Caution: Take a backup of your database before running this script.
- Log in to the vRealize Automation database as a user with sufficient privileges to alter the database.
- Execute this SQL query:
DECLARE @FromDateToPurge DATETIME = 'YYYY-MM-DD HH:MM:SS'
DECLARE @RowCount INT = 0
SELECT * INTO #tmpTrackingLogItems FROM [DynamicOps.Tracking].[TrackingLogItems] WHERE 1 = 0
SET IDENTITY_INSERT #tmpTrackingLogItems ON INSERT INTO #tmpTrackingLogItems (Id, TrackingSourceId, TrackingCategoryId, InstanceName, LogDatetimeUTC, LogDatetimeLocal, LogDatetimeServer, UserName, Severity, MachineName, Message, StackTrace) SELECT Id, TrackingSourceId, TrackingCategoryId, InstanceName, LogDatetimeUTC, LogDatetimeLocal, LogDatetimeServer, UserName, Severity, MachineName, Message, StackTrace FROM [DynamicOps.Tracking].[TrackingLogItems]
WHERE LogDatetimeLocal >= @FromDateToPurge SET IDENTITY_INSERT #tmpTrackingLogItems OFF
SET @RowCount = 0
SET @RowCount = (SELECT COUNT(1) FROM [DynamicOps.Tracking].[TrackingLogItems])
TRUNCATE TABLE [DynamicOps.Tracking].[TrackingLogItems]
SET IDENTITY_INSERT [DynamicOps.Tracking].[TrackingLogItems] ON INSERT INTO [DynamicOps.Tracking].[TrackingLogItems] (Id, TrackingSourceId, TrackingCategoryId, InstanceName, LogDatetimeUTC, LogDatetimeLocal, LogDatetimeServer, UserName, Severity, MachineName, Message, StackTrace) SELECT Id, TrackingSourceId, TrackingCategoryId, InstanceName, LogDatetimeUTC, LogDatetimeLocal, LogDatetimeServer, UserName, Severity, MachineName, Message, StackTrace FROM #tmpTrackingLogItems SET IDENTITY_INSERT [DynamicOps.Tracking].[TrackingLogItems] OFF
SET @RowCount = @RowCount - (SELECT COUNT(1) FROM #tmpTrackingLogItems) PRINT 'Rows purged from table [DynamicOps.Tracking].[TrackingLogItems are:' + CAST(@RowCount AS NVARCHAR(50)) DROP TABLE #tmpTrackingLogItems
Note: The date 'YYYY-MM-DD HH:MM:SS' in the script removes all log entries before the specified date.