You want to know how does Sharepoint 2007, 2010 and 2013 update SQL database fields for documents scanned by Scan Engine via its Protection for Sharepoint Servers connector.
In your MS-SQL database holding your Sharepoint site (AllDocs table), there are four fields containing virus-related information of each document stored, as also described in this Microsoft's MSDN article:
Please note that the above database fields are always present in a SharePoint database even if no antivirus for SharePoint is installed.
All objects in a Sharepoint database where values "VirusStatus"="NULL" and "HasStream"="1" will require a virus scan, should this be realtime or manual.
Sample SQL query
If you want to see the "VirusStatus" value of a specific document of which you know (part of) the name, the following SQL query can be used:
select LeafName,VirusVendorID,VirusStatus,VirusInfo from WSS_Content.dbo.AllDocs where (LeafName like '%<keyword>%');
Note: replace <keyword> with part of the document's file name.
The following table shows additional information for each of the values the "VirusStatus" database field can contain, as also described in this Microsoft's MSDN article:
"Virus Status" is a 4-byte, integer enumerated type that specifies the current virus scan status of a document. The following are valid values for Virus Status.
Value | Description |
0 | This document is reported as clean from viruses |
1 | This document had a virus reported by the virus scanner plug-in |
2 | This document had a virus reported by the virus scanner plug-in, which the scanner determines that it can remove |
3 | This document had a virus previously reported, but the virus scanner determines that it successfully removed it |
4 | This document had a virus reported, and the virus scanner attempted to clean it but failed |
5 | This document had a virus reported, and the scanner requested that the document be deleted |
6 | This document had a timeout from the virus scanner when it was last processed |
Notes
After each test involving the upload of an infected file to Sharepoint, the same file was then removed from *all* Recycle Bins (User + Site collection).
As long as the file exists on the Sharepoint database (i.e. it's still in a recycle bin) and has already received a virus "verdict", its virus-related information will remain on the database.
SPSS: Symantec Protection for Sharepoint Servers
SSE: Symantec Scan Engine
The scenarios below are based on the following deployment:
- Sharepoint Server 2007 installed on two farm servers.
- Scan Engine installed on one server.
- Symantec Protection for Sharepoint Servers 5.1.4 installed on both servers.
Results matrix
Scan Engine
SPSS
Scan on upload
Scan on download
Bypass scan
Eicar upload
Eicar download
VirusStatus
running
running
disabled
enabled
disabled
ok
error: virus found
2
running
not running
disabled
enabled
disabled
ok
error: virus scanner not available
6
not running
running
disabled
enabled
disabled
ok
error: virus scanner not available
6
not running
running
disabled
enabled
enabled
ok
error: virus scanner not available
6
Scenario A
Configuration:
Steps:
_____________________________________________________________________________________________________________
Scenario B
Configuration:
Steps:
_____________________________________________________________________________________________________________
Scenario C
Configuration:
Steps:
_____________________________________________________________________________________________________________
Scenario D
Configuration:
Steps:
_____________________________________________________________________________________________________________
Scenario E
Configuration:
Steps: