Geeks With Blogs

Locations of visitors to this page
Michael Van Cleave Traveling the technical world, learning the language
It is time again for another issue that I have run in to during the migration from WSS 2.0 to MOSS 2007 to be posted for everyone to see and also how we went about fixing it.

If you do much with SharePoint than you will know (or should know) that there is a little command line utility that will do just about anything that you want to do with SharePoint from the command line.  Yep, the little STSADM utility that helps you with installing web parts, features, attaching databases and the like is the one I am talking about.

The plan for our migration is to upgrade the 2.0 database and then export/import the sites from the old updated site to another web application in a better taxonomy.  To do this the STSADM utility allows us to do a smaller version of a Backup called an Export.  Why not just use Backup and Restore?  Well, there seems to be a couple of limitations with it that we couldn't handle.  The first limitation is that STSADM doesn't allow you to backup just a site.  It has to be a top site.  The second issue that we found was that it doesn't restore with permissions.  What I mean by this is that it will backup the content and the structure of the site, but when you restore it any permission set on list items or documents will not be there.  You have to go back and set them yourself; whereas with the Export command you could specify to include permissions.

Anyhow, on to the error that we found ran across and the fix.  While we were exporting sites, the team and I were noticing on some sites that we would error out and give us a cryptic error like:

Xxxxxx : User Not Found.

In the details of the error message it would mention that it was trying to call a method GetAuthor() and that the user could not be found, and nothing much more than that. 

Finally, a very sharp teammate found this link.

In it the savvy person states how he tracked down the error to being a field in the database that was pointing at a user that SharePoint didn’t recognize any longer.  So here is what we did to solve the issue.

1.      First open up your SharePoint database in Enterprise Manager or Management Studio (depending on what version of SQL Server you are using)

2.      Find the Webs table

a.      Perform a SELECT * FROM webs WHERE url = ‘<url path without servername>’

b.      You should get on row back.  On this row you should notice another field by the name of Author.  This should be numeric.  Also, another field that you should also pay attention to is the SiteId.  Remember what the Author ID is and the copy the SiteId Guid.

3.      Next, go to the UserInfo table and do a SELECT * FROM UserInfo WHERE tp_SiteId = <siteId> AND tp_ID = <AuthorID>.

a.      You should get one row back.  This is the author of the site.  If you look along the fields you might notice a couple of things.  In our case the users were no longer in AD due to the domain the person was in is no longer available, or the user is no longer in AD due to being deleted.  I am sure that these are not the only reasons for the error, but that was the problems we had encountered.

4.      So, now that you have identified the user that is the author of the site and since that user cannot be found, we need to find a user that belongs to that site that we want to assign as s the sites Author.

a.      Modify your last query to just include the tp_siteId in the where clause (take out the userID).  And execute.

b.      This should return all the users that have permission to that site.  Find one that you would deem responsible enough to be the author, or in the least still available in AD.  Copy the tp_ID.

5.      Now that we have found a valid Author go back and update the webs table Author field with the numeric ID you just copied from the UserInfo table.

Now if you try to export the site you should find that it will export without error.  Unless you have subsite that has the same issue.  I did find that usually if the author of the site was a problem, then most if not all of the subsites to that site might also be a problem.  It wouldn’t hurt to do a query on the webs table and see if the original AuthorId is found in the subsites to the site you are exporting.  If so, just update them to be the same user as you had updated the first site with. Posted on Monday, May 14, 2007 10:14 AM | Back to top

Comments on this post: STSADM : Export User Not Found Error

# I Just Want Things To Work!!! - Another SharePoint Horror.
Requesting Gravatar...
Ok, so if I have not said it 1000 times to anyone who would listen. SharePoint is that product that I
Left by The Original .NET Geek on Jun 06, 2007 9:11 AM

# re: STSADM : Export User Not Found Error
Requesting Gravatar...
Microsoft has a hotfix for this now which you have to get from them:
Left by Chris Rivera on Oct 12, 2007 2:19 PM

# re: STSADM : Export User Not Found Error
Requesting Gravatar...
Yep, they sure do. Except you might want to see my blog about that too. Be very careful about what you install, and especially if you have upgraded your installation from the beta versions.

Left by Michael on Oct 13, 2007 8:49 AM

# re: STSADM : Export User Not Found Error
Requesting Gravatar...
Thaaaaaaanks a lot man you solve a great problem for me.
thanks Again
Left by Ibrahim hammad on Feb 18, 2008 1:40 AM

# re: STSADM : Export User Not Found Error
Requesting Gravatar...
ThanQ very much. But here I'm using WSS 3.0. I need to export my data and Import into the new server system. We are having Windows Internal database as back-end. Can u please give me example explanation for 1 to 5 points...?Because i dont have the correct idea on WID. Can u explain me how to access WID database??
Left by P.Venkateswara Rao on Feb 18, 2008 9:54 PM

# re: STSADM : Export User Not Found Error
Requesting Gravatar...
P. Venkateswara Rao,
I haven't had to migrate away from the WID yet, but I did search for what type of information was out there. After many different promising looking articles, I think I found one that talks specifically about what you might be trying to do. Give this link a try. I hope that it helps.

Left by Michael on Feb 18, 2008 10:20 PM

# re: STSADM : Export User Not Found Error
Requesting Gravatar...
Thanks for ur responce Michael,

The article is not solving my prob. Anyway shall I get a document on WID features and how we can use WID as in command prompt with all the aspects. If possible can u please send me. Because I want to know the WID concept to reduce the risks on WID. I think u got my point.
Left by P.Venkateswara Rao on Feb 18, 2008 11:31 PM

# re: STSADM : Export User Not Found Error
Requesting Gravatar...
Hi Michael ,

I got the solution from the above one. I followed ur instructions and I change the author.after that my export command worked fine with no errors. But I got nearly 188 cmp files. Is I need to import these 188 cmp files manually. If so how much time it will take. Is there anyother way to export the site in single .cmp file.???
Left by P.Venkateswara Rao on Feb 20, 2008 3:02 AM

# re: STSADM : Export User Not Found Error
Requesting Gravatar...

I got the reason & solution for above problem.
Reason : when any document in the site is checked out to some user who's permissions are withdrwan then this error will occur while exporting the site.

Solution : Add the user again in the site with contribute access and try to export.. It will work fine :)..

No need for above tricks
Left by Harshada on Sep 09, 2011 3:50 AM

Your comment:
 (will show your gravatar)

Copyright © Michael Van Cleave | Powered by: