web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Error when trying to view the Audit Partitions in CRM

(0) ShareShare
ReportReport
Posted on by 8

I get an error when I try and view the Audit Partitions in CRM:

pastedimage1623666194800v1.png

I use the following in SQL to view the partitions:

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

Which results in:

I see a duplicate row that doesn't look right, could this be causing the issue?

pastedimage1623666334902v2.png

I've spoken to MS and they just keep saying upgrade to CRM 2016 v 8.2 which we can't do.

  • Suggested answer
    vishal bagadia_crm Profile Picture
    490 on at

    Hello,

    I hope that you have all relevant roles assigned to you or you are checking it using sys admin.

    The screenshot you shared, could be the root cause of your problem. Would suggest you to delete that specific duplicate Audit Partition using C# and then verify if it solves your purpose.

    following is the link, that guide you how to delete audit partition using C#.

    community.dynamics.com/.../881063

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Syed Aqib Raza Profile Picture

Syed Aqib Raza 96

#2
11manish Profile Picture

11manish 90 Super User 2026 Season 2

#3
ParthPatel249 Profile Picture

ParthPatel249 80

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans