- Windows Updates
Run windows updates manually and frequently. Turning on automatic updates is not advised, based on the history of windows updates breaking certain products. Before installing updates, check the internet for reports of issues it could cause with your applications.
Exclude MDF, NDF, LDF, BAK, TRN and BCP file extensions and make sure schedules scans don;t coincide with other scheduled tasks.- Backups
Perform a full system backup periodically and before and after installations are run.- Defragmentation
SANs and SSDs are less likely to get fragmented in normal operation. If a drive is used only for database files, it is less likely to need defragmentation. Drives that hold BAK files will need frequent defragmentation.
SQL Server Setup Best Practices
- Plan the data storage scheme before installing SQL
Disk 1: OS, page file, SQL Server binaries- Check for Physical File Fragmentation before creating a database or log file
Disk 2 or LUN 1: MDF files (Except tempdb)
Disk 3 or LUN 2: LDF files
Disk 4 or LUN 3: tempdb files
Disk 5 or LUN 4: BAK files
- Pre-size MDF and LDF files
- Do not set auto-growth of MDF or LDF files to a percentage. Set it to a value in MB
Revisit periodically and reset initial size if necessary- Plan disk sizes so that you can keep free drive space above 15%
- Turn on Instant File Initialization in SQL
- Turn on Auto Statistics
SQL Server Maintenance Best Practice for a Typical GP Instance- Use Full backup model
- Weekly (or more frequent) Full database backup, transported off site.
- Nightly incremental database backup
- Periodic log backups throughout the day
Use backup compression- What should you back up?
master- When backing up data, the tasks should be run in this order
msdb
DYNAMICS
All company databases
NEVER back up tempdb
Model only needs to be backed up when making changes to master (such as when upgrading or patching SQL Server)
1. Check DB- When backup up logs, maintenance tasks are not necessary
2. Reorganize indexes
3. Update Statistics
4. Backup Database
SQL Server Manual Period Maintenance Tasks- Index Maintenance
(These tasks could be scheduled, but their results should be checked before allowing users back into the system)
Add missing indexes- Msdb Maintenance
Remove unused and duplicate indexes
Monitor indexes for excessive fragmentation
Periodically delete backup, restore, job, and maintenance plan history- Shrinking
sp_delete_backuphistory [oldest date]
Use log file viewer for others
Always rebuild indexes after shrinking. If you need to avoid growing the file with a rebuild after shrinking, then at least re-organize indexes. Shrinking leaves indexes nearly 100% fragmented by design.- Monitor Drive free space
Never shrink tempdb
Shrinking should be a rare occurrence if the growth settings are tuned properly
Keep more than 15% free- Monitor SQL Server logs and Windows event logs for errors and warnings
Did this help you? If so, please leave a comment!