As mentionned in the above article, editing the SharePoint databases is not supported. However, I had to find a way to get my users' links back in there.
- So I copied the [NewSSP].dbo.QuickLinksAdd stored procedure to a personal "toolbox" database on the server.
- I modified this "local" storedproc to fetch the user's RecordId and force the policy number to a fixed value.So basically, the start of the stored proc goes like this:
ALTER PROCEDURE [dbo].[QuickLinksAdd] --@RecordId bigint, @NTName nvarchar(400), @PageURL nvarchar(1250), @Title nvarchar(500), @ContentClass nvarchar(200) = null, @Group nvarchar(400) = '', @GroupType int = 2, @ItemSecurity int = 1, @PolicyId uniqueidentifier = '861D8FB6-7012-4CD9-A7A0-A615AED038B3', --may be relative to our implementation @ColleagueRecordId bigint = null, @LinkUserIdIsWorkgroup bit = null, @LinkMemberGroupId bigint = null AS SET NOCOUNT ON DECLARE @RecordId bigint, @ProfileObjectType int, @LinkId bigint -- Constants (used for events) DECLARE @ProfileChangeType_Add int SET @ProfileChangeType_Add = 1 -- CHECK FOR CURRENT USER SELECT @RecordId = [RecordID] FROM [NewSSP].[dbo].[UserProfile_Full] WHERE NTName = @NTName IF (@@ERROR <> 0 ) RETURN -1 ...
Followed by the rest of the stored proc, adding the database name where other stored procs are called. - After testing one, I ran a loop on the data from the original SSP database.