Blog Layout

Best practice for SQL maintenance and backups for GP clients

Nov 05, 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 


Dexpro March Newsletter
By Marlena Stark 18 Mar, 2024
Team expansion to support Dynamics 365 CRM, new Microsoft promotions, and more in the Dexpro March Newsletter.
Pitfalls of Patching and Over-Customization in D365 BC
By Marlena Stark 08 Mar, 2024
Learn from the pitfalls of patching and over-customization in Dynamics 365 Business Central. Discover the consequences of choosing the wrong partner and diving into customization without a proper understanding of system architecture. Find out how Dexpro Dynamics offers tailored solutions, guiding you through successful ERP implementations and avoiding costly mistakes. Contact us today to build a solid foundation for your business.
February Newsletter
By Marlena Stark 11 Feb, 2024
Transition from Dynamics GP to D365 Business Central, compare cloud scenarios, and more in the Dexpro February Newsletter.
Compare Cloud Scenarios
By Marlena Stark 08 Feb, 2024
Discover the ultimate guide to cloud migration for Dynamics GP. Whether you're considering migrating to Azure or making the leap to Dynamics 365 BC, our comprehensive comparison provides invaluable insights to help you make an informed choice. From cost considerations to functionality and scalability, we cover it all, ensuring you're equipped with the knowledge needed to optimize your ERP solution.
Dexpro January Newsletter
By Marlena Stark 26 Jan, 2024
Q1 Planning for your ERP system, the cost of moving Dynamics GP to Azure, and more in the Dexpro January Newsletter.
Move Dynamics GP to Microsoft Azure
By Marlena Stark 11 Jan, 2024
Explore the cost considerations and steps involved in moving Dynamics GP to Microsoft Azure for enhanced flexibility and efficiency. Learn how to optimize Azure licensing, save on memory usage, and strategically plan the transition to minimize overall expenses.
Dexpro December Newsletter
By Marlena Stark 07 Dec, 2023
Prepare for Year-End and Processing 1099s in Dynamics GP, ISV Best Prices of the Year, and more in the Dexpro December Newsletter.
Neglected Dynamics GP System
By Marlena Stark 05 Dec, 2023
Discover the outcome when a company's Dynamics GP system became burdened with expired third-party tools, unrecorded customizations, disorganized configurations, and a poorly designed chart of accounts. These challenges were rooted in problems from the initial system implementation.
By Marlena Stark 16 Nov, 2023
Preparing for year-end in Dynamics GP, New features in Dynamics 365 Business Central, and more in the November Newsletter.
By Marlena Stark 11 Oct, 2023
Full list of new features in the Dynamics GP October release 18.6, preparing for Year-End in Dynamics GP, and more in the Dexpro October Newsletter.
More Posts
Share by: