2011-08-29

Stop MySite from being deleted.


Issue:
The My Site of [USER] is scheduled for deletion.
The My Site of [USER] is scheduled for deletion in 3 days. As their manager you are now the temporary owner of their site. This temporary ownership gives you access to the site to copy any business-related information you might need. To access the site use this URL: http://mysites/personal/[USER]

Cause:
  • User profile deleted
  • User profile re-imported
  • User profile has its Personal site property missing
There's a Timer Job that runs every hour called My Site Cleanup Job. This job among other things looks at dbo.Profile_DeletedUsers and My Sites that don't have a current user profile association.
When it finds a My Site without a user profile association it adds the site to the dbo.MySiteDeletionStatus table in the Profile DB.

Fix:
  • Ensure the User Profile has the site associated with his account
  • The following query will give you profiles with a My Site.
    SELECT PropertyVal, p.* FROM dbo.UserProfileValue v inner join dbo.UserProfile_Full p on p.RecordID=v.RecordID where PropertyID=22 and PropertyVal is not null
    If the account isn't there you need to go to: Central Administration > Manage User Profiles and add the URL to the Personal site property.
  • Delete the MySiteDeletionStatus record.
    This table has a NotificationStatus column with values 1-3 calculated based on the Created column.
    1 = 14 days til deletion email, 2 = 3 days til deletion and 3 = 1 day til deletion.
    This last step is the only crucial one.
BTW: This theoretically will leave the Db in an unsupported state, because we're not supposed to edit or even query SP DB's directly... so don't tell anyone and no one will know.

No comments :

Post a Comment