如何查询 Sharepoint 数据库? [英] How do I query the Sharepoint database?

查看:21
本文介绍了如何查询 Sharepoint 数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想检索一些数据.如何查询 Sharepoint 数据库?

I want to retrieve some data. How can I make a query on a Sharepoint database?

推荐答案

你不应该因为这些 原因:

  1. 这完全您在安装时同意的 EULA 不支持共享点.(我要补充一句,不支持直接更改或调用触发器(部分除外),但不支持选择)
  2. 在向 SharePoint 应用任何补丁或服务包后,不能保证您的查询有效,因为 Microsoft 可以随时更改数据库架构.
  3. 直接查询数据库会给服务器带来额外的负载,从而导致性能问题.
  4. 针对数据库的直接 SELECT 语句在默认事务级别采用共享读取锁,因此您的自定义查询可能会导致死锁,从而导致稳定性问题.
  5. 您的自定义查询可能会导致检索到的数据不正确.
  1. This is completely unsupported by the EULA you agreed to when you installed SharePoint. (I have to add a note that changing or calling triggers (except some) directly is unsupported, but not selecting)
  2. Your queries are not guaranteed to work after applying any patches or service packs to SharePoint since Microsoft could change the database schema anytime.
  3. Directly querying the database can place extra load on a server and hence performance issues.
  4. Direct SELECT statements against the database take shared read locks at the default transaction level so your custom queries might cause deadlocks and hence stability issues.
  5. Your custom queries might lead to incorrect data being retrieved.

让我澄清一下,#1 不允许您以任何方式修改共享点数据库.SELECT`ing 是允许的,但是,如前所述,这可能会导致其他问题.

Let me clarify, that #1 DOES NOT ALLOW you to modify sharepoint database in any way. SELECT`ing is permitted, however, as mentioned, that may lead to other problems.

但是,如果您对这些点不感兴趣,那么只需使用 Visual Studio 连接到现有数据库,只需执行有关如何连接到任何其他数据库的常规过程即可.

However, if you are not interested in these points, then just use Visual Studio to connect to existing database, just do the regular procedure on how you connect to any other database.

但是您可以创建自己的数据库并在那里存储一些其他信息.

But you can make your own database and store some additional information there.

  1. 使用 SharePoint 对象模型(代码只能在 SharePoint 服务器上运行)
  2. 使用 SharePoint WebServices(从任何地方,从任何应用程序)
  3. SharePoint 2013 现在具有 REST API.
  1. Use SharePoint Object Model (Code can only be run on SharePoint server)
  2. Use SharePoint WebServices (Run code from anywhere, from any application)
  3. SharePoint 2013 now features REST API.

这篇关于如何查询 Sharepoint 数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆