如何获取 SharePoint“我的链接”在删除并恢复配置文件后返回?
我们正在运行 SharePoint 2007 SP1,并且配置文件是从 Active Directory 导入的(每天运行一次完整导入)。我们遇到了一个问题,许多用户在 Active Directory 中被无意禁用,这导致他们的配置文件从 SharePoint 中删除。我们重新启用了他们的 Active Directory 帐户并运行了完整导入,以恢复他们的 SharePoint 配置文件。但是,他们的所有“我的链接”都丢失了。有没有恢复它们的方法或最佳实践?
We're running SharePoint 2007 SP1 and profiles are imported from Active Directory (a full import runs daily). We had a problem where many of the users were disabled unintentionally in Active Directory and this caused their profiles to be removed from SharePoint. We re-enabled their Active Directory accounts and ran a full import which restored their SharePoint profiles. However, all of their My Links are missing. Is there a method or best practice for restoring them?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我发布此内容是因为我在任何地方都找不到问题的答案。 Joel Oleson 的这篇文章 描述了与我类似的问题给了我一个关于去哪里寻找丢失数据的提示。和 Corey Roth 的这篇文章向我展示了如何以编程方式将链接添加到用户的“我的链接”。
首先,您需要恢复包含“我的链接”数据的数据库备份。您不想恢复工作数据库,而是想将其恢复到另一个位置。存储在 SSP 数据库中的链接。 (您可以通过进入 Central Admin --> Shared Services Admin 找到数据库的名称,然后打开 SSP 的菜单并单击“编辑属性”- SSP 数据库列在属性页面上。)
数据库完成后已恢复 您想要检索链接信息:
此查询将为您提供该信息:(
我应该注意,我没有考虑帐户链接设置为哪个组或什么隐私级别,您可能可以通过查看 UserPrivacyPolicy 表中的信息找到该信息)
我将结果复制到 Excel 和 Excel 中将其保存为 .csv 文件(逗号分隔列表) - 只是因为我的生产服务器无法访问我恢复数据库的位置。我最后订购了带有标题的列,因为标题可能包含逗号,这会扰乱我读取数据的方式。 (我检查过,其他两个字段不包含逗号 - 您应该在做出此假设之前检查您的字段。)
然后我编写了一个小控制台应用程序来导入数据。它需要两个参数:
这些是使用的引用:
这是代码:
所以问题解决了&作为一个附带好处,该程序可用于强制链接显示在用户的“我的链接”列表中。
I posted this because I couldn't find an answer to my problem anywhere. This post by Joel Oleson that describes a similar problem to mine gave me a hint as to where to go looking for the missing data. And This post by Corey Roth showed me how to programatically add the links to a users My Links.
First things first - you need to restore a backup of the database that contains the My Links data. You don't want to restore over your working database, you want to restore it to another location. The links stored in the SSP Database. (You can find out the name of the database by going into Central Admin --> Shared Services Admin then open the menu for the SSP and click on Edit Properties - the SSP Database is listed on the properties page.)
Once the database has been restored you want to retrieve the Link information:
This query will get you that information:
(I should note that I did not take into account what group or what privacy level the links were set to, you could probably find that information by looking at the information in the UserPrivacyPolicy table)
I copied the results into Excel & saved it as a .csv file (comma separated list) - just because my production server did not have access to the location where I restored my database. I ordered the columns with Title last because the Title could contain commas and that would mess up how I'm reading in the data. (I checked and the other two fields do not contain commas - you should check yours before making this assumption.)
I then wrote a little console app to import the data. It takes two arguments:
These are the references used:
And this is the code:
So problem solved & as a side benefit, this program can be used to force links to show up in a user's My Links list.
这篇文章提供了一些关于 MyLinks 及其与 SSP 数据库的关系的非常好的信息(这实际上是这些链接违反直觉地存储的地方。)希望您可以让 DBA 验证这些链接是否仍然存在;并且它们与正确的配置文件相关联。
http://www.k2distillery.com/ 2009/01/moving-sharepoint-my-links- Between-ssps.html
This post has some pretty good information about MyLinks and its relationship with the SSP database (that's actually where these links are stored counterintuitively.) Hopefully you can have your DBA validate that these links still exist; and that they're associated with the correct profiles.
http://www.k2distillery.com/2009/01/moving-sharepoint-my-links-between-ssps.html
当您进行配置文件导入时,通常会面临丢失现有自定义/更新信息的风险。
When you do a profile import, you normally risk losing the existing customization/updated information.