Best practice for SQL maintenance and backups for GP clients

November 5, 2021

Best practice for SQL maintenance and backups for GP clients

1.     Nightly backup 

o   Schedule daily at midnight

o   Only Full backup and Maintenance clean up task selected

o   Only user databases are selected

o   Maintenance clean up pointed to the backup folder, file extension bak and to include first-level subfolders. Usually set up for 2 weeks. 

GP Maintenance Cleanup Task


2.     Transaction Log backup             

o   Make sure all GP databases are set up Full recovery mode (database properties, options, recovery mode) 

o   Create transaction logs as Daily, most common approach is to do either every 15 min or 1 hour depending on client’s needs and capabilities of the server and only during business hours

GP Transaction Log backup

 

3. Select only Backup Transaction Log and Maintenance Task


Maintenance Plan Wizard


Select All databases  (this list will only include database that are set up to have full recovery mode)


4.     Point Maintenance Clean up to backup folder, enter TRN for file extension and select to Include first-level subfolders



5.     Most common approach is to set to delete files every 2 days.

GP define maintenance cleanup task


System Database backup

-        Schedule it weekly over the weekend

-        Select only Full backup and Maintenance Cleanup Task

-        Select System database

-        Point Maintenance Cleanup Task to backup folder

-        Enter file extension bak

-        Mark to include first-level subfolders

-        Delete files every 2-4 weeks 


Database maintenance plan 

-        Schedule it weekly after nightly backup (for example Saturday at 2am) 

-        Select:

o   Check Database Integrity 

o   Reorganize Index

o   Rebuild Index

o   Update Statistics


Do not include backup. The idea is to recover to midnight backup in case something goes wrong with maintenance plan. 


GP select maintenance tasks


Select all user databases and accept the defaults. You can exclude individual DBs if needed. 

 

Note: If you do not select to make a backup to include first-level sub folders, the clean up maintenance will fail. 

 

Other SQL best practices:

Make sure that SQL memory allocation is capped at 80% of server memory

Make sure that owner for Dynamics and other GP companies is DYNSA

Make sure that SQL version for each individual DB reflects correct Compatibility Level


For clients with many GP companies use for example:

sp_msforeachdb ' USE [?] IF ''?'' <> ''master'' AND ''?'' <> ''model'' AND ''?'' <> ''msdb'' AND ''?'' <> ''tempdb''

 BEGIN  ALTER  DATABASE [?] SET COMPATIBILITY_LEVEL = 130; END 


Colleagues reviewing Dynamics 365 Business Central and Sales CRM on a laptop during a business meeti
By Marlena Stark • October 16, 2026
See why manufacturers running Business Central are adding Dynamics 365 CRM instead of Salesforce, thanks to better pricing and hands-on support from Dexpro.
IT professional reviewing analytics dashboards beside a server rack in a modern office.
By Marlena Stark • October 16, 2026
Staying on Dynamics GP feels safe, but does it save you money? See the real costs and timeline advantages for moving to Business Central.
Healthcare technology case study showing Dynamics 365 Sales replacing HubSpot.
By Marlena Stark • October 6, 2026
See how a healthcare technology company replaced HubSpot with Dynamics 365 Sales to centralize customer data, streamline sales, and improve visibility.
Woman reviewing business analytics dashboards on multiple monitors in a modern office.
By Marlena Stark • October 6, 2026
See how a global asset manager moved from Salesforce to Dynamics 365 Sales to reduce costs, improve efficiency, and modernize customer engagement.
Promotional graphic for an ERP Software Blog interview with Marlena Stark, CEO of Dexpro Dynamics.
By Marlena Stark • August 28, 2026
Read ERP Software Blog’s interview with Dexpro Dynamics CEO Marlena Stark on honest sales, personal service and choosing the right ERP partner.
By Marlena Stark • August 17, 2026
"Dexpro Dynamics simplified a complex Business Central and Dynamics 365 Sales setup for a medical device manufacturer, untangling two systems into one that finally works."
By Marlena Stark • August 17, 2026
See how ongoing Dynamics GP support helps a manufacturing company maintain stability, reduce risk, and confidently plan its next technology move.
By Marlena Stark • August 12, 2026
See how Dexpro Dynamics simplified Hely & Weber’s Business Central setup, removed integration bottlenecks, and cut future infrastructure costs by over 90%.
By Marlena Stark • August 12, 2026
Learn how CEIA-USA keeps Microsoft Dynamics GP running smoothly while evaluating a future move to Dynamics 365 Business Central.
ERP evaluation with a solution architect
By Marlena Stark • July 26, 2026
Why you should not settle for endless sales calls with people who will never touch your system. The value of meeting the architects and implementers who will build your future.