The Audit Log Management screen is showing the dates wrong, there are also logs missing in the CRM view
Anyone know how to fix it? Thanks!
I used the following query in SQL:
IF (CONVERT(int, (SELECT SERVERPROPERTY('EngineEdition'))) = 3) BEGIN SELECT partition_number AS 'PartitionNumber' , prv.value AS 'End Date' , used_page_count*8 AS 'Size in KB' FROM sys.dm_db_partition_stats pst LEFT OUTER JOIN sys.partition_range_values prv ON prv.boundary_id = pst.partition_number WHERE object_id = object_id('AuditBase') AND index_id in (0,1) END ELSE BEGIN SELECT DATENAME(qq, CreatedOn) AS 'Quarter' , YEAR(CreatedOn) AS 'Year' , COUNT(*) AS 'Rows' FROM AuditBase GROUP BY DATENAME(qq, CreatedOn), YEAR(CreatedOn) ORDER BY 'Year','Quarter' END
View from CRM:
view from SQL: