Trouble running stsadm –o migrateuser

by Håvard Hebnes 8. July 2009 10:26

Yesterday I tried to migrate a user from one domain to another domain running:
stsadm -o migrateuser -oldlogin domain1\user -newlogin domain2\user –ignoresidhistory

This resulted in the following error:
The site with the id c725736f-d942-4475-b3c1-bf1f8c8a1339 could not be found.

To find out which sitecollection this id belongs to I ran the following sql query:
SELECT [Id], [SiteId], [FullUrl]
FROM [WSS_Content_DB].[dbo].[Webs] where SiteId = 'c725736f-d942-4475-b3c1-bf1f8c8a1339'

Result:
Id    SiteId    FullUrl
99642E4D-6C53-49D0-996C-7650C494971C    c725736f-d942-4475-b3c1-bf1f8c8a1339    personal/mysiteuser

After this I ran another test which requires that SP2 is installed on your server:
stsadm -o preupgradecheck

The result from this command can be found here:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\LOGS\PreUpgradeCheck-TIMESTAMP.htm

Look for the following section:
Failed : Orphaned site collections

An orphaned site collection is a site collection exists in the content database, but it is not in the configruation site map. Such site collections is not accessible and will not be upgraded properly.The follow orphaned site collections where found:

  • /personal/mysiteuser(Data Source=sqlserver\instance;Initial Catalog=WSS_Content_DB;Integrated Security=True;Enlist=False;Connect Timeout=15)

I then confirmed that this sitecollection was the same as the one that I had problems with.

Solution
To fix this I deleted the sitecollection with this command (Requires SP2 if you use –force or -siteid):
stsadm -o deletesite -siteid c725736f-d942-4475-b3c1-bf1f8c8a1339 -databaseserver SQLSERVER\instance
-databasename wss_content_db -force

After this I migrated the user successfully.

Links:
Deletesite- Stsadm operation

Powered by BlogEngine.NET 1.6.0.0
Theme by Mads Kristensen