排查SharePoint中的orphaned sites

你可以使用下面的命令来找到orphaned sites.

 

stsadm -o enumallwebs -databasename M4_Content_1 -databaseserver M4 > webs.txt

 

如果你在输出结果中发现哪个Site的InSiteMap属性为False, 那么这个站点就是orphaned的了.

 

另一个检测方法是运行stsadm命令:

stsadm -o databaserepair -url http://<URL_of_WindowsSharePointServices_Site> -databasename <name of database that contains the orphan item>

 

要修复orphaned sites, 你可以运行下面的命令:

stsadm -o databaserepair -url http://<URL_of_WindowsSharePointServices_Site> -databasename <name of database that contains the orphan item that is to be deleted> -deletecorruption

 

2011-06-30更新:

注意, 如果数据库中存在URL冲突的orphan site的话(比如之前有个站点集url为portal1, 后来该站点集由于某种原因变为了orphan, 后来又建立了url同为portal1的站点集), 在升级或摘挂content DB的时候, 有可能会出现本来work的站点集消失或显示不正常的情况.

 

这是由于在挂content DB或升级的时候, SharePoint在向Config DB中SiteMap表中注册站点集数据的时候, 错误地选用了之前orphan的站点集. 解决方案是使用如下的步骤:

 

1. 明确当前正在使用中的不正常的siteid, 然后运行命令

stsadm -o deletesite -force -siteid <siteid guid> -databasename WSS_Content_MyContentDB –databaseserver MyDBServer

2. 将当前的content DB摘下, 再挂上(Detached and reattached)

3. 重复第1,2步, 直到目标站点正常出现在sitemap表中, 且正常显示为止.

 

 

更多信息:

STSADM (Part 3)

http://blogs.msdn.com/spblog/archive/2009/06/22/stsadm-part-3.aspx

Databaserepair: Stsadm operation (Office SharePoint Server)

http://technet.microsoft.com/en-us/library/cc263282.aspx

Orphaned Sites - Part 1

http://blogs.msdn.com/krichie/archive/2005/10/25/484889.aspx

posted on 2010-04-06 14:15  中道学友  阅读(414)  评论(0编辑  收藏  举报

导航

技术追求准确,态度积极向上