如何使用数据库查找 SharePoint 2010 列表的 SharePoint DirName、LeafName 和 ContentType?

发布于 2024-12-28 21:09:38 字数 922 浏览 2 评论 0原文

在 SharePoint 2003 中,有一个名为“AllUserData”的表,用于存储所有列表和文档的数据:http://msdn.microsoft.com/en-us/library/dd358229(v=PROT.13).aspx

我对此表中的 3 个主要列感兴趣:

  • tp_ContentType
  • tp_DirName
  • tp_LeafName

在 SharePoint 2010 中,存在此表;但是,上述列已被删除或移动到其他地方。

在哪里可以找到与 SharePoint 2010 中的共享点列表/文档关联的那些列?它们被移到哪张桌子了?

我意识到这需要正确理解 SharePoint 2010 数据库架构。

(我知道,直接从数据库结构读取不是推荐的方法;如果可以的话,请回答我的问题。)

我尝试的是使用以下脚本找出具有相似名称的列列表:

select b.name as ColumnName, a.name as TableName
from sysobjects a 
    join syscolumns b 
        on a.id = b.id 
where a.type = 'u' and
     ((b.name like '%dir%')) or  (b.name like '%leaf%') or  (b.name like '%contenttype%'))
order by 2

它返回了一些表和列,但我不确定这是找到这些列的正确方法。

我也找不到有关此的任何文档?

希望问题清楚。

谢谢,

In SharePoint 2003 there is a table called "AllUserData" which is used to store data for all lists and documents: http://msdn.microsoft.com/en-us/library/dd358229(v=PROT.13).aspx

I'm interested in 3 main columns in this table:

  • tp_ContentType
  • tp_DirName
  • tp_LeafName

In SharePoint 2010, this table exists; however, the above columns are removed or moved somewhere else.

Where could I find those columns associated with a sharepoint list/document in SharePoint 2010? To which table have they been moved?

I appreciate this requires proper understanding of the SharePoint 2010 database schema.

(reading from database structure directly is not the recommended approach, I know; just please answer my question if you can.)

What I tried was to find out the list of columns with a similair names with the below script:

select b.name as ColumnName, a.name as TableName
from sysobjects a 
    join syscolumns b 
        on a.id = b.id 
where a.type = 'u' and
     ((b.name like '%dir%')) or  (b.name like '%leaf%') or  (b.name like '%contenttype%'))
order by 2

It returned some tables and columns but I'm not sure this is the right way to find those.

I couldn't find any documentation about this either?

Hope the question is clear.

Thanks,

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文