How can I query the Sharepoint database?

I want to get some data. How can I make a request in the Sharepoint database?

+5
database sharepoint
source share
3 answers

You should not because of these reasons :

  • This is not fully supported in EULA , which you agreed to when installing SharePoint. (I have to add a note that changes or trigger calls (except for some) are not directly supported, but not selectable)
  • Your queries do not guarantee operation after applying any patches or service packs for SharePoint, because Microsoft can change the database schema at any time.
  • Direct querying the database can lead to additional load on the server and, consequently, to performance problems.
  • Direct SELECT statements in the database use common transaction-level read locks by default, so your user queries may cause deadlocks and therefore stability issues.
  • Your user queries may result in incorrect data retrieval.

Let me clarify that # 1 DOES NOT ALLOW you to modify the sharepoint database in any way. However, as mentioned above, SELECT`ing is allowed, which can lead to other problems.

However , if you are not interested, just use Visual Studio to connect to an existing database, just follow the normal procedure for connecting to any other database.

But you can create your own database and save additional information there.

Accessing SharePoint data correctly:

  • Use SharePoint Object Model (code can only be run on a SharePoint server)
  • Use SharePoint WebServices (Run code from anywhere, from any application)
  • SharePoint 2013 now has a REST API .
+11
source share

I have one thing to add. If you decide to directly query the sharepoint content databases, use the NOLOCK hint to prevent the removal of shared locks and the potential for deadlocks in the application.

+7
source share

If you don't mind using other proprietary Microsoft programs, all Access / Excel / PowerBIs offer built-in links to data stored in sharepoint lists / document / metadata libraries.

0
source share

All Articles