SQL Server Best Practices
Installation
It is recommended that you use the most current:
-
Hardware drivers.
-
IPRO-supported Operating System (OS) version and service pack.
-
IPRO-supported SQL Server version with the latest service pack and hotfixes.
Note: Consult with IPRO Support or review the System Requirements
documentation for all components to be installed and to confirm
supported OS and SQL Server versions. Please check with IPRO Support
if you wish to install additional components or other third-party
applications.
Security
In order for IPRO products to be able to create and modify cases, a SQL authenticated account must be created with the following permissions:
-
bulkadmin
-
dbcreator
-
public
When using multiple SQL servers:
-
Linked Server objects must be created on each server and connected to each other server in the environment.
-
Use the same SQL username and password for all servers hosting the same instance.
Note: To provide the greatest security for your environment, do not
use the SA account for IPRO’s Software.
Server Configuration
It is recommended that you:
-
Do not run any other software or applications on the SQL Server.
-
Do not run any Antivirus locally.
-
Use 64-bit hardware and software (OS and SQL).
-
Configure maximum server memory and leave 4GB for the OS.
Data and Log File Management
Build partitions with Industry Best Practice settings:
-
Partition Offset – All partitions regardless of purpose should be checked for partition alignment. 1024kb is recommended for all partitions, and is the Windows default.
-
Partition Cluster Size – All disks holding SQL data files (MDF, LDF, and TempDB) should use 64KB clustersize, which is different than the Windows default of 4KB.
Note: Storage device selection may dictate alternate settings for
Partition Offset and Cluster Size. Consult with your storage vendor for
recommendations on your specific environment.
-
Specify a fixed size for log file growth, rather than percentage.
-
Pre-size data and log files to minimize autogrowth events.
-
Manage file growth manually (As a backup, leave autogrow on and set to a fixed size).
-
Enable instant file initialization.
-
Set MAXDOP accordingly.
-
Max Degree of Parallelism – Typically set to the number of logical processors not to exceed 8. We recommend 4 for most environments.
-
Increase the Cost Threshold of Parallelism to 25 - 50.
-
-
Avoid putting any database files on the OS drive.
-
MDF data files should be on their own dedicated disks/spindles.
-
Store on fastest storage for read operations RAID 5-15K RPM.
-
-
LDF log files should be on their own dedicated disks/spindles.
-
Store on fastest storage for write operations RAID 10-15K RPM.
-
-
Tempdb system database should be on its own dedicated disks/spindles.
-
Store on fastest storage available RAID 10-15K RPM, Solid State Disk (SSD) if possible.
-
Set initial size to the file’s maximum size +10% under typical load.
-
Add multiple tempdb files as needed. Use at least one file for every four processors and up to one file per processor.
-
Keep the file size identical between eachfile.
-
-
SQL system files (binaries) should be on their own dedicated disks/spindles.
-
Store on fastest storage for read operations RAID 5-15K RPM.
-
-
Validate volume performance with diskspd prior to installing SQL.
-
Use full recovery mode on active review databases.
-
Do NOT shrink database files without consulting with IPRO Support, as this is a very intensive resource-heavy process which can cause massive amounts of logical scan fragmentation and lead to poor performance.
-
Run sp_delete_backuphistory to maintain space and backup performance (MSDB grows over time).
Back Up/Restore Plan
On a daily basis, run a full back up on all system and production user databases.
-
Back up transaction logs at least hourly (depending on activity and recovery point objective).
-
Periodically test backups to verify they can be restored.
-
Back up to a separate location from the data and log drives.
-
DO NOT store backups long-term on the SQL Server.
-
Maintain secure, off-site backups to mitigate physical threats.
-
Create a Disaster Recovery Plan (DRP) that outlines step-by-step procedures to recover SQL Servers. Practice the DRP to verify it is complete (System owner should be familiar with this process).
Maintenance
It is recommended that you:
-
Rebuild indexes regularly and when index fragmentation is >30%.
-
Reorganize indexes when fragmentation is 5%–30%.
-
Use sys.dm_db_index_phsical_stats to identify fragmentation.
-
Check OS, SQL Server, and error logs for any warnings, errors, or abnormal events.
-
Schedule integrity checks at least weekly.
-
Ensure you are keeping up with the latest service pack and hotfixes from Microsoft.
Alerts Monitoring
It is recommended that you:
-
Create a SQL Server event alert for all events with a severity of 19 (fatal) or higher.
-
Create and configure Database Mail to ensure alerts are emailed to the party responsible for monitoring SQL Server health.
-
Consider using third party monitoring tools to provide real-time alerts of critical SQL Server resources, especially low disk space and low RAM (<25% of Operating System reserved memory free).
