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 


Promotional graphic for an ERP Software Blog interview with Marlena Stark, CEO of Dexpro Dynamics, f
By Haley . 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.
By Marlena Stark June 16, 2026
Most Microsoft Dynamics consulting firms tell you what you want to hear. Dexpro tells you what you need to hear. Learn what sets us apart from other Dynamics 365 partners.
Smiling on bridge
By Marlena Stark May 26, 2026
Still on Dynamics GP? Microsoft's Bridge to Cloud 3 promotion offers a 30% discount on Business Central licenses. Learn if your company qualifies.
By Marlena Stark November 24, 2025
Microsoft Dynamics GP Latest Updates
By Marlena Stark April 20, 2025
What do you need to stay on Microsoft Dynamics GP