SPC030204: Do not query SharePoint databases directly

It is not allowed to read or write directly to SharePoint databases. Use API, webservices etc. instead.

TypeName: DoNotQuerySharePointDatabasesDirectly
CheckId: SPC030204
Severity: Error
Type: AssemblyFileReference
Resolution

Remove the statement for reading from the SharePoint database (see Remarks for limitations of this rule).

Microsoft Statement regarding read operations of SharePoint database:
Reading from the SharePoint databases programmatically, or manually, can cause unexpected locking within Microsoft SQL Server which can adversely affect performance. Any read operations against the SharePoint databases that originate from queries, scripts, .dll files (and so on) that are not provided by the Microsoft SharePoint Development Team or by Microsoft SharePoint Support will be considered unsupported if they are identified as a barrier to the resolution of a Microsoft support engagement.
If unsupported read operations are identified as a barrier to the resolution of support engagement, the database will be considered to be in an unsupported state. To return the database to a supported state, all unsupported read activities must stop

Remarks

The rule may lead to wrong results. The rule can only check the appeareance of SQLCommand, OdbcCommand or OleDbCommand which indicates database access. If one of these types is detected the rule can only check defined strings in the code for appearances of names of SharePoint database tables, views and stored procedures. But the rule is too important to not check for database access.

Links

comments powered by Disqus