SPC030204: Do not query SharePoint databases directly |
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 |
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
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.
comments powered by Disqus
Copyright © 2013 RENCORE AB. All Rights Reserved
Disclaimer: The views and opinions expressed in this documentation and in SPCAF are those of the creators and do not necessarily reflect the opinions and recommendations of Microsoft or any member of Microsoft. All trademarks, service marks, collective marks, copyrights, registered names, and marks used or cited by this documentation are the property of their respective owners. SharePoint Code Analysis Framework, Version 4.5.2.7855, see www.spcaf.com for more information |