How to choose antivirus software to run on computers that are running SQL Server
Virus protection software requires some system resources to execute. You must perform testing before and after you install your antivirus software to determine whether there is any performance effect on the computer that is running SQL Server.
Security risk factors
- The value to your business of the information that is stored on the computer.
- The required security level for that information.
- The cost of losing access to that information.
- The risk of either virus or bad information propagating from that computer.
High-risk serversAny server is at some risk of infection. The highest risk servers generally meet one or more of the following criteria:
- The servers are on the public Internet.
- The servers have open ports to servers that are not behind a firewall.
- The servers read or execute files from other servers.
- The servers run HTTP servers, such as Internet Information Services (IIS) or Apache. (For example: SQL XML for SQL Server 2000.)
- The servers are also hosting file shares.
- The servers use SQL Mail or Database Mail to handle incoming or outgoing email messages.
Virus tool types
- Active virus scanning: This kind of scanning checks incoming and outgoing files for viruses.
- Virus sweep software: Virus sweep software scans existing files for file infection. It detects files after they are infected with a virus. This kind of scanning may cause the following SQL Server database recovery and SQL Server full-text catalog file issues:
- If the virus sweep has opened a database file and still has it open when SQL Server tries to open the database (such as when SQL Server starts or when SQL Server opens a database that AutoClose has closed), the database to which the file belongs might be marked as suspect. The SQL Server database files typically have the .mdf, .ldf, and .ndf file suffixes.
- If the virus sweep software has a SQL Server full-text catalog file open when the Microsoft Search service (MSSearch) tries to access the file, you may have problems with the full text catalog.
- Vulnerability scanning software: The Microsoft Security Tool Kit CD includes best practice guidelines, information about how to help secure your system, and service packs and updates that can protect your system against virus attacks. It also provides Microsoft tools to help you secure your systems and keep them secure. To download it, visit the following Microsoft website:
- Antispyware software: Spyware and unwanted software refers to software that performs certain tasks on your computer, typically without your consent. For more information about how to help protect the computer from spyware and unwanted software, visit the following Microsoft website:890830 The Microsoft Windows Malicious Software Removal Tool helps remove specific, prevalent malicious software from computers that are running Windows Vista, Windows Server 2003, Windows XP, or Windows 2000
Directories and file-name extensions to exclude from virus scanningWhen you configure your antivirus software settings, make sure that you exclude the following files or directories (as applicable) from virus scanning. Doing this improves the performance of the files and helps make sure that the files are not locked when the SQL Server service must use them. However, if these files become infected, your antivirus software cannot detect the infection.
Note For more information about the default file locations for SQL Server, refer to the "File Locations for Default and Named Instances of SQL Server" topic for your specific version of SQL Server in SQL Server Books Online.
SQL Server 2012
SQL Server 2008 R2SQL Server 2008SQL Server 2005
- SQL Server data files
These files usually have one of the following file-name extensions:
- SQL Server backup files
These files frequently have one of the following file-name extensions:
- Full-Text catalog files
- Default instance: Program Files\Microsoft SQL Server\MSSQL\FTDATA
- Named instance: Program Files\Microsoft SQL Server\MSSQL$instancename\FTDATA
- Trace filesThese files usually have the .trc file-name extension. These files can be generated either when you configure profiler tracing manually or when you enable C2 auditing for the server.
- SQL audit files (for SQL Server 2008 or later versions) These files have the .sqlaudit file-name extension. For more information, see the following topic in SQL Server Books Online:
- SQL query filesThese files typically have the .sql file-name extension and contain Transact-SQL statements.
- The directory that holds Analysis Services data
Note The directory that holds all Analysis Services data is specified by the DataDir property of the instance of Analysis Services. By default, the path of this directory is C:\Program Files\Microsoft SQL Server\MSSQL.X\OLAP\Data. If you use Analysis Services 2000, you can view and change the data directory by using Analysis Manager. To do this, follow these steps:
- In Analysis Manager, right-click the server, and then click Properties.
- In the Properties dialog box, click the General tab. The directory appears under Data folder.
- The directory that holds Analysis Services temporary files that are used during Analysis Services processing
Note For Analysis Services 2005 and later versions, temporary files during processing are specified by the TempDir property of the instance of Analysis Services. By default, this property is empty. When this property is empty, the default directory is used. This directory is C:\Program Files\Microsoft SQL Server\MSSQL.X\OLAP\Data. If you use Analysis Services 2000, you can view and change the directory that holds temporary files in Analysis Manager. To do this, follow these steps:
- In Analysis Manager, right-click the server, and then click Properties.
- In the Properties dialog box, click the General tab.
- On the General tab, notice the directory under Temporary file folder.
Optionally, you can add a second temporary directory for Analysis Services 2000 by using the TempDirectory2 registry entry. If you use this registry entry, consider excluding from virus scanning the directory to which this registry entry points. For more information about the TempDirecotry2 registry entry, see the "TempDirectory2" section of the following Microsoft Developer Network (MSDN) website:
- Analysis Services backup files
Note By default, in Analysis Services 2005 and later versions, the backup file location is the location that is specified by the BackupDir property. By default, this directory is C:\Program Files\Microsoft SQL Server\MSSQL.X\OLAP\Backup. You can change this directory in the properties of the instance of Analysis Services. Any backup command can point to a different location. Or, the backup files may be copied elsewhere.
- The directory that holds Analysis Services log files
Note By default, in Analysis Services 2005 and later versions, the log file location is the location that is specified by the LogDir property. By default, this directory is C:\Program Files\Microsoft SQL Server\MSSQL.X\OLAP\Log.
- Directories for any Analysis Services 2005 and later-version partitions that are not stored in the default data directory
Note When you create the partitions, these locations are defined in the Storage location section of the Processing and Storage Locations page of the Partition Wizard.
- Filestream data files (SQL 2008 and later versions)
- Remote Blob Storage files (SQL 2008 and later versions)
- The directory that holds Reporting Services temporary files and Logs (RSTempFiles and LogFiles)
Processes to exclude from virus scanningSQL Server 2012
- %ProgramFiles%\Microsoft SQL Server\MSSQL11.<Instance Name>\MSSQL\Binn\SQLServr.exe
- %ProgramFiles%\Microsoft SQL Server\MSRS11.<Instance Name>\Reporting Services\ReportServer\Bin\ReportingServicesService.exe
- %ProgramFiles%\Microsoft SQL Server\MSAS11.<Instance Name>\OLAP\Bin\MSMDSrv.exe
SQL Server 2008 R2
- %ProgramFiles%\Microsoft SQL Server\MSSQL10_50.<Instance Name>\MSSQL\Binn\SQLServr.exe
- %ProgramFiles%\Microsoft SQL Server\MSSQL10_50.<Instance Name>\Reporting Services\ReportServer\Bin\ReportingServicesService.exe
- %ProgramFiles%\Microsoft SQL Server\MSSQL10_50.<Instance Name>\OLAP\Bin\MSMDSrv.exe
- %ProgramFiles%\Microsoft SQL Server\MSSQL10.<Instance Name>\MSSQL\Binn\SQLServr.exe
- %ProgramFiles%\Microsoft SQL Server\MSSQL10.<Instance Name>\Reporting Services\ReportServer\Bin\ReportingServicesService.exe
- %ProgramFiles%\Microsoft SQL Server\MSSQL10.<Instance Name>\OLAP\Bin\MSMDSrv.exe
- %ProgramFiles%\Microsoft SQL Server\MSSQL.1\MSSQL\Binn\SQLServr.exe
- %ProgramFiles%\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\Bin\ReportingServicesService.exe
- %ProgramFiles%\Microsoft SQL Server\MSSQL.2\OLAP\Bin\MSMDSrv.exe
Considerations for clusteringYou can run antivirus software on a SQL Server cluster. However, you must make sure that the antivirus software is a cluster-aware version. Contact your antivirus vendor about cluster-aware versions and interoperability.
If you are running antivirus software on a cluster, make sure that you also exclude these locations from virus scanning:
- Q:\ (Quorum drive)
If you back up the database to a disk or if you back up the transaction log to a disk, you can exclude the backup files from the virus scanning.
For information about third-party detours or similar techniques in SQL Server, click the following article number to view the article in the Microsoft Knowledge Base:
Article ID: 309422 - Last Review: 10/09/2013 09:01:00 - Revision: 23.0
- kbsql2005cluster kbinfo KB309422