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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Shrink CRM Database

(0) ShareShare
ReportReport
Posted on by

Can i Shrink a CRM Database? Or Shrink a specific table?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Muhammad Adeel Javaid Profile Picture
    5,580 on at

    Please refer to the link given below:

    www.interactivewebs.com/.../slow-performance-or-large-database-file-in-ms-crm-asyncoperationbase

  • Community Member Profile Picture
    on at

    You can use the "shrink" operations, if you're familiar operation.  However, there are already routines that optimize the size for you.  Generally speaking, large CRM databases have large amounts of data--and you may want to consider your options for warehousing or eliminating anything that your CRM system doesn't actively need.  With OnPremise, you can easily figure out which tables are consuming the most space, and consider an approach.  With Online, you'll need to get Microsoft Support involved in providing the database use metrics.  If you don't mind the size, but are more concerned with its impact on speed, then optimizing your indexes will add a fair amount of benefit for little overall cost.

  • Verified answer
    Muhammad Adeel Javaid Profile Picture
    5,580 on at

    You can also shrink the CRM database transaction log file by running the following SQL script after making backup of database and transaction log:

      1: BACKUP LOG MYCOMPANY_MSCRM WITH TRUNCATE_ONLY

      2: GO

      3: DBCC SHRINKFILE (MYCOMPANY_MSCRM_log, 1)

      4: GO

  • Verified answer
    Mohammad Atif Profile Picture
    on at

    You can : msdn.microsoft.com/.../aa176794(v=sql.80).aspx but you may not, shrinking the database is not always a good option and you need to look into the details before actually performing this step directly. Shrinking the complete database which is small in size is most of the time work but shrinking the database which are very large in size is not always good. I would say check which file is big .mdf or .ldf based on that you may shrink the specific file if there is really some space to release.

    For CRM I would say check the recovery model of the database if that is set to simple or not, if that is not what is the reason for keeping the recovery model to any other than simple and if there is no reason take a full backup , change the recovery model to simple and then shrink  it will release the unused space (if there is any) immediately.

    How to shrink a database (Enterprise Manager): msdn.microsoft.com/.../aa176794(v=sql.80).aspx

    Thanks,

    Mohammad

  • Community Member Profile Picture
    on at

    Thanks, I solve my Problem with your solutions.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans