困擾我許久的就是 <wssuc:welcome/> Welcome Control 中的顯示名稱,並不會跟 SSP(共用服務;Shared Services Provider) 中做連動,
當 SSP 網站上 User Profile 做完整/累加匯入時,會寫入 SSP 資料庫(以下稱為 SSP_DB)的 UserProfile_Full 資料表中,
但是經實驗發現,Web 應用程式中頁面都是抓內容資料庫 (Content Database,以下簡稱 Content_DB)的 UserInfo 資料表,
經過與 Sharepoint MVP 十一(Andy-11) 討論後,發現 Sharepoint 2003 就有這樣子的問題,還有人寫了一個 SP 專門處理。
update b set b.tp_Title=a.PreferredName , b.tp_Email=isnull(a.Email,'')
from SPS_DB.dbo.UserProfile_Full a
join CONTENT_DB.dbo.UserInfo b
on b.tp_login = a.NTName and a.bDeleted='0' and b.tp_Deleted='0'
and b.tp_Title<>a.PreferredName
以上跟大家分享一下 Sharepoint 2007 User Profile 同步的語法,希望大家不會用得到。
2009/06/25 更新
此部份,微軟已有 HotFix 修正此問題,謝謝十一的提醒
http://support.microsoft.com/kb/952683/ (2008/05/08)
The welcome name on a site is not changed as expected after you edit the name of a user profile in SharePoint Server 2007