Mitch Milam's Dynamics CRM Discussions
Knowledge found and lost while working with Microsoft Dynamics CRM
-
Shrinking the CRM database transaction log
On one of my CRM installations I began to notice that the transaction log for the MSCRM database was not shrinking even though it was being backed up properly. If you don't keep an eye on the physical files, they can grow to huge sizes.
After making a full backup of the database and transaction log, the following SQL script will shrink the transaction log file:
1: BACKUP LOG MYCOMPANY_MSCRM WITH TRUNCATE_ONLY
2: GO
3: DBCC SHRINKFILE (MYCOMPANY_MSCRM_log, 1)
4: GO
Note: Just replace MYCOMPANY with the name of your CRM database name.
Note 2: The second command does indeed have "_log" appended to the name. That is the device name for the transaction log itself.
Customization, Dynamics CRM 1,630 viewsLeave a reply



