Running Anti-Virus on SQL Servers
By Saleem Hakani on 9/20/2014
Running Antivirus software is critical part of server security but it is also important to understand the impact and effect it has on SQL Server. Imagine this: You’ve installed Anti-Virus on a server that already has SQL Server running, once the server reboots, it is highly likely that the Anti-virus software depending upon the scanning schedule will scan the SQL Server folders and lock SQL Server files before SQL Server can gain access to that file. When this happens, SQL Server would not be able to access those files and there’s also a possibility of data corruption if you SQL Server tries to access the data file or log file that is being scanned by Anti-virus software. It is also important to understand that not just .MDF and .LDF files should be excluded from Antivirus but also other important files that can have an impact on SQL Server.
Here’s the recommended list of SQL Server files that needs to be excluded from all Anti-virus scans:
- SQL Server Data Files (files with extensions like .MDF, .NDF)
- SQL Server Log Files (files with extensions like .LDF)
- SQL Server Backup files (files with extensions like .BAK and .TRN)
- Full-Text Catalog Files
- SQL Server Audit Files
- SQL Server Query Files (Extensions like .SQL)
- Trace/Profiler Files (Extensions like .TRC)
- Entire Directory that is holding Analysis Services files that is used for processing Cubes
- Folder where Analysis Services Backups Files Reside
- Exclude SQLServer.Exe file (This is the main database engine file)
- ReportingServicesService.Exe
- MSMDSrv.exe
- Cluster Directory (Usually it is C:\Windows\Cluster) *If your servers are clustered
- Cluster Quorum Drive
Taking care of excluding the above files will make sure your Anti-Virus software doesn’t interfere with any SQL Server operations. However, keep in mind that you may experience some slowness when running Anti-Virus software on the same server as SQL Server but at-least it will not corrupt your data and will not lock any SQL Server operations.