Michael Van Cleave
Traveling the technical world, learning the language

Moving SharePoint Database Data Files

I ran across a client that was looking to move the SQL Server data files and logs from their SharePoint 2007 installation to another drive. The reason was to free up some space on the drive that SQL Server was installed on. I decided to post the steps that I took so that it might be beneficial for others. Now, with that said, I am not completely positive that my steps are the best possible way; but it did accomplish the task and everything worked when I was done. So I guess the steps I took couldn't have been too bad. J

Here are the steps:

  1. Quiesce the Farm – This is especially important if you are working on a production system. Pretty much it takes the farm out of commission and doesn't allow any more sessions to be created.
  2. Backup all of the databases that you are looking to move.
    1. With the client I was working with they were looking to move all of the SharePoint database data and log files. Your needs may vary, but in any case this is another very important step. Be sure you have a current backup of any databases you will be fiddling with.
  3. Turn off SharePoint Services
    1. This will stop the connections to some of the databases. If you try to detach any of the databases you will find that some will have connections active. In case of the content databases you will probably find that the connections to the have already been taken care of. Either way you will need to stop some of the SharePoint services in order to get the search databases and config database totally disconnected.
    2. You can either stop the services through the Central Administration, or you can do it at the Services Console. I chose the services console since I didn't want to deal with typing in configuring the services again.
      1. To stop the connections to the existing databases stop the following services:
        1. Office SharePoint Search Service
        2. Windows SharePoint Services Administration
        3. Windows SharePoint Services Search
        4. Windows SharePoint Services Timer
        5. Windows SharePoint Services Tracing
        6. World Wide Web Publishing Service
  4. After the services are stopped, you should be able to detach the databases that you are looking to move.
  5. After detaching the databases navigate to where the data and log files are being stored and copy them to your destination.
  6. Reattach your databases.
  7. Restart your services.
  8. Un-quiesce the farm.

If everything went well, you should have the ability to get back to your sites and all of your content. If not, you can always roll back to the database data files you previously had in the old location. I would recommend doing a test run on a development machine first to be sure that you not encounter any problems.

Hopefully, you will find this to be helpful in your quest if you run in to the same need.

Happy SharePointing..

Michael

 

Wiki - Is it right for me?

I had a respondent to another one of my posts ask me a very interesting question.  I had to pause and think about the answer for a couple of minutes.  I guess I had taken for granted my process for explaining when to use one method over another for implenting wiki's.

If you are using SharePoint you realize that you have a couple different ways to implent a Wiki.  You can create a Wiki Library in a site, or you can create a Wiki site.  So what is the difference?  Essentially nothing.  You have the same ability to capture tacit knowledge.  So when should you use one over the other?

Here is the method I use to decide:

First off, if the information that is being captured only is useful to the a sites members or a team I would use a Wiki Library inside of a team site.  Reason being is that it is really specific for only that purpose and usually the content that is being delivered is not of interest outside of that group.  So a great example for this would of course be a Team Project Site that needs to share common information or content.  So things like jargon, buisness concepts, or even requirements can be captured and quickly shared with the rest of the team.

Now when would I use a Wiki site?  Well, this is more of the macro version of the list concept.  I would use this when the content is going to be of interest to anyone that is going to a portal.  To give you a good example, think of a company that is using SharePoint as a intranet.  Departments could use Wiki sites to publish content to the rest of the company that is important to the company as a whole.  So lets assume that Human Resources wants to make it easier to publish Policies and Procedures, an Employee Handbook, or even Company Benefit FAQ's then a wiki site can be created to capture the content. 

Anything inbetween is just a judgement call, but remember if you decide later you should have gone with one over the other you can always migrate the content.

Hopefully this will be helpful to you in the future when you decide to use wiki's.  And Kay (Phoebe), thank you for the idea for the post.

MIchael

When do you throw in the towel?

In a previous post I mentioned that I recommended using WSS or SharePoint for kick starting the creation of web based applications. With that said, I need to post on another important subject that has come up in regards to that. I have a client which I really enjoy working with. They are a good company and they did see the potential benefit of using SharePoint to get their application a solid foundation. They utilized WSS 3.0 to create their web presence and web application for their customers. However, the company that they first hired to create this application built it out completely with SharePoint Designer 2007.

So now that you have the overview here are some of the details of how this became a tragic situation.

The company that built this application used just a standard ASP.NET developer instead of a person that had any SharePoint experience. How do I know this? Well none of the built in SharePoint functionality was used in the code, and while we are on the topic of the code; since it was all done in SharePoint Designer it is all inline code with no real ability to actively debug. Common code is copied and pasted in close to ever page, and whenever they wanted to get at a SharePoint list or other object they would create the SPSite object utilizing a hard coded url instead of using the SPContext object.

After they finally finished up with the initial consulting company they decided to hire a much larger consulting firm to come in and try to fix the initial implementation that the first company did such a bad job putting together. Well, after a while maintaining and trying to stabilize the product the finally decided to part ways to.

Now it I have it. I am looking at the application and wondering if it is able to be saved. One of the directors I am working with asked when he would finally have an application that he didn't see as needing constant attention and when they would feel like they could stop cursing the first consulting company. My reply was that I really didn't know. I am person that makes decisions based on logic and fact, and from what I have seen I don't accurately think I could even give him an estimate of time to get the application to that point. To fix most of the average issue on the application takes hours or days and usually causes other bugs to surface. I know that most of you have seen this before. So the question is when do you throw in the towel and start over? I know that it can be painful, but usually in the end you come out with a better application and it is usually better built.

Either way, please don't let this dissuade you from using SharePoint for development, but please be sure that if you are not familiar with using SharePoint as an application or as a framework make sure that you have someone that has some experience with it before you just start throwing code together. If that is not an option, please look in to Ted Pattison's Training. I have taught his WSS course and it is the best start to getting in to doing REAL development with SharePoint. If you need are recommendation of the course that would best suite you or would like some advise please don't hesitate to contact me. I would be happy to help.

Until then, happy coding.

Michael

Wine and Cheese Event

A couple weeks ago I had the opportunity to present on SharePoint at a Wine and Cheese Server 2008 Launch event. It was quite an event. The event itself had over 150 attendees' signup and was very busy. And to hold true to most all events there were some terrific raffle prizes. One guy actually went home with a new Xbox 360 and Guitar Hero III.

It is still amazing to me the acceptance and the challenges people are facing with SharePoint. On one hand companies are implementing SharePoint at a break neck pace, yet many of them are becoming rapidly upset with the implementation because it was implemented carelessly or by someone that just didn't know the nuances of SharePoint. On the other hand I had a couple of attendees that were very excited about the implementation at their office, but the rest of the office was refusing to use it because it was just another new application that was installed and they were never asked if they actually needed it. While others were still in the process of evaluating it and getting their heads around what SharePoint could do for them.

For one thing it was an eye opening experience to see such a wide spectrum of people interested, frustrated, and confused about SharePoint.

Which will lead me to my next post….

Until then, Happy Coding.

Michael

Getting back in to the saddle

Well it has been quite a while since I last posted, but for good reason. I have been under an avalanche of SharePoint work with the new company I started with while back. When all is said and done I will post more about the project I am working on.

Enough blathering about how busy I am, the main reason I am posting is to mention that I am getting back in the saddle on presenting and teaching.

A while back I started teaching for a fabulous training center here in Denver by the name of Ameriteach. Everyone there is great and best of all I get to teach some of the best SharePoint training content on the market the Ted Pattison Group WSS Development course. If you are interested in SharePoint development you definitely cannot go wrong with this course. It covers all of the basic techniques SharePoint development and by far is the best that I have seen as far as content. Checkout the course and Ameritech if you are looking for a good way to get in to SharePoint and creating best practice SharePoint solutions.

On another note, if you are in the Denver area on the 13th of March and looking for a geeky evening out you should check out the 2008 launch event that is being sponsored by Ameriteach, Qortex, and SoftwareONE. It is an Ask the Experts evening with Wine and Cheese, the new 2008 launch products, and other breakout sessions. It looks like it will end up being an extremely fun evening.

I will post more about the evening after the event.

Until then, Happy Coding.

Michael

When TRUE is not true

Well, I am back again to just make sure that all of you SharePoint developers are not wasting your time. I am not quite sure if this has been posted before or not, but I found it impressive enough to blog about it.

So here is the lead up. I am working on a great new project that requires me to create some Site Columns and Content Types using a SharePoint feature. Well I have a couple of Site Columns that need to be Rich Text multiline text areas. So in an element manifest file, you would type in something like this.

 

    <Field ID="{GUID}"

         Name ="ShortDescription"

         DisplayName="Short Description"

         Type="Note"

         RichText="true"

         RichTextMode="Compatible"

         Sortable="false"/>

 

So I did that and deployed and enabled the feature, but when I went to the site columns list to verify that my CAML was correct and the column was created as a multiline Rich Text field. Well, low and behold it wasn't. It was still listed as Plain Text.

 

Plain Text Setting

 

Notice that I really want the selection to be Rich Text.

So, I went back to my CAML and found that everything looks right. I decided to take Ted Pattison's advise and do some detective work. I created the what column I wanted then used the object model to pull the field from a list to see what the CAML looked like. Low and behold it was the same…. EXCEPT…

    <Field ID="{GUID}"

         Name ="ShortDescription"

         DisplayName="Short Description"

         Type="Note"

         RichText="TRUE"

         RichTextMode="Compatible"

         Sortable="false"/>

The RichText Property was set to all uppercase true. I updated my CAML and Bingo.

 

Rich Text Screen

 

Just in case it hasn't set in yet. It seems that the true value for this specific property in CAML is case sensitive. Not sure why. I have played around with a few of the properties and it doesn't seem to affect them, but the testing was not very specific and not overly conclusive.

 

Hope this helps you get past the issue faster than I did.

Michael.

Do you ever feel like…

You are really far behind on technology? Even though I am playing with and implementing some really cool stuff with SharePoint and some of the newer technologies, this last trip to NY for the Infusion Sleepless weekend really opened me up to the feeling that I am not doing enough to keep up.

I guess I am going to have to go to the experts and really start paying attention to what is going on and watch what they have to offer. How do you say I need more time to read blogs in 13 different languages?

Another thing that I realized is that I haven't had much time to keep up with the latest titles being produced by Carl and Richard on DNR. In looking at the list I guess there have been a lot of good titles that they have produced. I guess I should start scheduling about an hour or so out of my day to just focus on what is going on out in the world around me.

I guess that will be if I can keep myself from playing myself to death with the new Xbox360 that I won during the course of the weekend. I sure hope they got it shipped. I am hoping to get some serious ass kicking in on Halo 3 when it arrives.

Until another time.

Michael

Sleepless In New York 2007 – What a great time

I know that it has been a while since I last posted, but I have not had a lot to spout off about. That is until now.

I recently went through the process of qualifying for the Sleepless In NY contest that was being put on by DotNetRocks, Microsoft, and Infusion.

 Sleepless In NY

I would say that the process didn't seem to be too hard, but it was three different interviews with different people from Infusion. The idea was that if you passed all of the interviews and was lucky enough to make the cut then you would get an all expenses paid trip to New York to get some intense training from some Microsoft and Infusion folks on Silverlight and SharePoint.

Well, I guess I got pretty lucky because I was selected to make the trip. I was very psyched.

Now this was a trip worth writing about. When we got there, we were treated to a quick overview of SharePoint by Kurt from Infusion (talk about a guy that doesn't need any more caffeine….). After the introduction, we were taken to the 17th floor of a building located on Time Square for some kick ass barbeque.

I was out until about 1:00am ET and headed back to the hotel. Now don't get me wrong, we were going to have some INTENSE training, so I wanted to get some shut eye before the real training started.

The next morning when we go there we found out that we would have an all star cast of presenters and judges that would be taking part in the event. We had the likes of Lawrence Liu (Microsoft SharePoint Guru), Sahil Mailik (SharePoint Extraordinaire) , Carl Franklin and Richard Campbell (DotNetRocks.net), Bob Fox (SharePoint MVP), and a list of other really great folks from Infusion.

Anyhow we went through the day with some really great sessions about WPF, Silverlight, and SharePoint. We also had a great presentation by Lawrence about the upcoming additions to SharePoint that were being worked on by the SharePoint Community at CodePlex, called the CKS (Community Kit for SharePoint). I would highly suggest you check it out. The work they are doing is unbelievable and you can get in on the action.

Later that day through contests a few people walked away with some very cool prizes. Things like Tom Binh laptop backpacks, great books on SharePoint, a Microsoft Zune, and even an Xbox360 Elite. There was also an Insomniac Laptop and a Trip to Redmond as some of the larger prizes. The nice part is that the guy who never wins anything won the Xbox. Yep, I got lucky and was awarded the crème of the crop Xbox. I was so shocked, I thought they were talking about someone else when the called my name. It took a bit to figure out that I was the only Mike in the room. J

As the day wore on we were assigned a project to do over night and would have to present in front of the judges the next morning. Needless to say the group I was a part of tried all night to get out project done. It was unfortunate, but we did try pretty hard.

After that I left for home. I would have to say that the gang and Infusion and everyone else that took part did a bang up job of taking care of our every need and definitely over delivered on the weekend. It would be at the very minimum to say that they did an outstanding job. I truly don't think there are any words to describe what a terrific job they did.

Keep an eye out for other contests like this. Infusion mentioned that if this was a success that they would probably be doing more. If they do, do everything you can to get selected. It is a worthwhile investment of your time, and you will not regret it.

Michael

Enabling MySites in MOSS 2007

Okay, this might seem like kind of a corny post, but I have run in to a couple of people inquiring about how to enable MySites after they have disabled them by using my previous post.

Pretty much it is the reverse of the article, but for good measure I will just go through the steps here too.

  1. Go to the Shared Service Provider that is hosting the MySites
  2. Go to Personalization Services Permissions
  3. Add or Edit the user account you want to enable the MySites functionality for.
    1. If you want to give all authenticated users permissions then edit the NT Authority\Authenticated Users account
    2. If you previously deleted the Authenticated Users Account then you might have to add it back in if the first part of step 3a remains true.
  4. When you get to the permissions screen check these 2 permissions
    1. Create Personal Site
    2. Use Personal Features

Now please be aware that this shouldn't be taken lightly. You definitely need to be sure that you have planned for capacity.

Hope this helps.

Michael

Interesting Issue with STSADM –o Export

So I ran in to an interesting issue doing yet another migration this weekend for my current client.

The client had a department that was utilizing SharePoint through the B2TR period of SharePoint beta testing. I upgraded their server to RTM bits and then proceeded to so the migration to the production team site server using STSADM export. Seems all fine and dandy right?

Not really. Something interesting happened when I tried to import the exported content to the production server. I ran in to an error message telling me it couldn't find the IPFSSiteFeatures. Being that I know where to find the features, I thought I would check it out. I navigated to the Features directory to find that the folder was there that had the feature in it. Hmmmm…

So in doing more research I remembered that the department server that was running the beta SharePoint was utilizing the Enterprise edition. The server that I was migrating the content to was installed with Standard edition. So, in finding that the feature mentioned above was an Enterprise feature it would seem that the export/import commands on STSADM is doing more than just moving content and site information.

I guess this makes since when it is actually trying to recreate the same site that is being moved and a site template might be an Enterprise site. I went back and traversed the sites on the department server to see if they were utilizing any of the Enterprise related features and I couldn't find an instance anywhere on the sites I was exporting.

How did I get passed the problem?

Well, that is a good question. Via STSADM, I installed the features that it asked me to install, meanwhile keeping a list of features I was installing. Seeing as though they were Enterprise features I wanted to be sure to uninstall them after the import since we were not running the Enterprise license. After installing the features, importing the content, and uninstalling the features everything seemed to work just fine.

The moral of the story is that don't expect to be able to export/import content between the standard and enterprise versions of SharePoint.

I guess I also could have tried to use the Content Deployment capability that SharePoint has, but every time I have tried that I always ran in to errors that I couldn't track down or figure out.

Hope this helps.

Michael

Interesting Conundrum

So, in review of the event logs on the index server of the medium MOSS 2007 farm that my client is using I keep running across a lot (And I mean A LOT) of error events, some with the Event ID of 7076 and some with 6398. I ran across this interesting blog post by Gayan Peiris.

Now I am not one to just go on a hotfix rampage, but now that I have run in to problems with the last hotfix that I installed at Microsoft's request it didn't go so well. See my last post.

Anyhow, I thought I would just mention that Gayan has put together a very good post, but I also found that if you fallow the links you will eventually end up at Microsoft's DevDiv Hotfix Availability Program page. WHAT? Yep that is right, it is a way to get those Hotfixes that you need to get a hold of Microsoft to get. Now that doesn't make much sense, but either way it looks like you are able to download the hotfix that Microsoft is recommending to Gayan.

Just please be warned by the comment at the top of the page.

WARNING: These fixes have not gone through full Microsoft regression testing. Specifically, these hotfixes have had targeted testing which does not include testing in combination with other hotfixes. You are encouraged to only install the specific hotfixes needed to address the problem you have.

Please carefully review the associated KB article for each hotfix you install to verify that this is the fix you need and that there are no known compatibility or installation issues. You may also want to contact a Microsoft Support Professional.

I would hate to see you go through the same problems I did when I installed the last hotfix.

So I guess, what do I do? Recommend hotfixing the servers? Or just wait it out until Microsoft puts their seal of approval on the hotfix? I think either way it is going to be a tough decision for the customer.

Enjoy, and don't hotfix anything that's not broken. J

Michael

 

Troublesome SharePoint 2007 Hotfix – KB936867

Okay, so I am back with another rendition of things I should have learned in Kindergarten, but must have been absent that day. J

Thursday of last week , we had a team site owner cleaning up a her team site getting rid of things that were no longer needed and lists that were no longer used. Well, it just so happens she executed a click path that sent about 23 of her 78 sites in to the ether and whenever she or her teammates tried to access the sites they would get a plain SharePoint "500 – Internal Server Error" page.

I checked the logs and could find nothing that was being documented as for the server error.

After some looking around in the Webs table of the content database for the SharePoint web application, I noticed that the sites were not deleted or missing. So this pointed out to me either we had an IIS problem or an internal SharePoint problem. Since much of the configuration is stored in the database for SharePoint I was betting on it being a SharePoint problem. Especially since we were getting a plain 500 Error page from SharePoint, not like the one that IIS would put out if it had run in to a problem.

Finally I had resolved to call Microsoft Support after working through all of my known debugging techniques. The call started with us redoing much of the checks I had already performed, but then the support tech mentioned there is a forthcoming KB article that would mention a Hotfix for SharePoint that would not be publicly available, but you would have to get in touch with Microsoft Support to get it.

The KB article that he was talking about was KB936867. It is not posted yet, but according to him it is in process of being published. The hotfix is supposed to fix about 11 different issues that Microsoft has been seeing with SharePoint that has been the highest on the radar of issues.

Before we started the Hotfix process, I had mentioned to the support technician that the farm we were working with was a B2 installation that was migrated to B2TR migrated to RTM. This was not a concern to him. Nevertheless we started the Hotfix install. Hotfix installed fine, then we needed to run the Configuration Wizard to apply the hotfix to the SharePoint farm. Half way through the applying of the hotfix, the configuration wizard bombs and tells us that half of the SharePoint Database is now upgraded and the other half is not. The 2 databases the blew up was the Shared Services Provider database and the Configuration database.

So now we have ½ of the farm database upgraded and the other ½ not.

Needless to say after some major panic and working through a few different scenarios, the support tech finally gets a product guy in from the Hotfix or SharePoint team (not sure which), but from what I gained from talking to him is that we shouldn't have used this hotfix if this installation was migrated from the Beta 2 bits. Oooops.

From that moment on, it was pretty apparent that I would be rebuilding my SharePoint farm and reconfiguring my web applications, reconfiguring my Shared Service Provider and going through general hell.

For the rest of the evening we recreated the farm in such a way that it would have the Hotfix installed, but we ended up having to recreate the Configuration database and the Shared Service Database.

Lesson to be learned from this. Never ever only ask once if your farm being migrated from beta bits will be a problem. Make sure that who you are talking to knows for sure that this has been tried and proved.

So, if you run across someone that is mentioning to you that you need to install this hotfix be VERY sure that you are not running the hotfix on a Beta 2 migrated installation. Or be sure that it mentions that this is an approved use of the hotfix. If not, you might be running in to a situation like I did and have to go through hell to get your farm backup and running.

 

Hopefully this will keep you from running in to the same situation.

Michael

Team Site Migration to Production

Well, I would have to say that it went well overall.

We had prepared for doing the migration and we really worked out all of the risks that we should anticipate for the roll, but we ran in to a few complications that we didn't expect.  So, figuring that I had blogged earlier about the migration steps, I thought it would only be fitting that I also include these tips to help everyone else as well.

So early in the evening, we go the database backed up on the old server, over night transferred it to the new database server and restored it.  That next morning, we created the upgrade web application, and started exporting sites.

Now note, there are 2 people me and another user both remoting in to the application server of the farm and using STSADM export commands to export the upgraded site data to move it to a new web application with a new site structure.

TIP #1:
Only on person should do the export at a time.  Two main reasons we found were the server capability to handle 2 seperate intense processes exporting a large amount of data, and the second is we noticed on the import it seemed like the export may not have really exported all of the object (lists, calendars, sub-sites) from the upgraded sites.

TIP #2:
Use the -versions switch on the export command for STSADM.  We originally used the default and again it seemed like it really didn't export everything, we decided to set it to the max versions (4) and it did a much better job of exporting all of the objects we missed the first time.

TIP #3:
Allow for plenty of time for exporting and importing sites.  This didn't seem like it would take that long when I performed these actions in a development environment, but when we did it in production it took much longer than we had anticipated.

TIP #4:
Make sure to have a database admin engaged.  We started to get strange errors about a third of the way through close to 200 sites and found that the database ran out of physical disk space to expand to.  Be sure that you have plenty of space on your database server dedicated to the database.

TIP #5:
Make sure you have enough disk space on the drive of the server you are running the STSADM export command on.  If you have a site with a lot of sub sites and lots of content, the export will be very large.  While the export is running it is packing your files in .dat files in the <root>/Documents and Settings/<user>/Local Settings/Temp/<number>.  While it is buiding these files, you can eat up many GB of disk.  I recall one large site hierarchy took close to 11 GB of space just for that one export.  So make sure you have the space.

Hopefully this will save you some of the time we spent on working these out.

Michael

TrikeForTheTroops.com - You have to see this.

Okay, normally my blog is about technology stuff and I am sure that it can be pretty dry from time to time, but I thought this would be a terrific opportunity to spice things up and introduce you to something that is completely hysterical and also for a great cause.

Here is the story.  One day coming up soon is Bike To Work Day.  And one of the funniest and most charitable guy's I know is going to take full advantage of it.  He (and his wife I am sure) decided to put together a fund raising event that would stick in your mind forever.  He decided to "Trike" to work!.  Yep, that is right TRIKE!.  What is the big deal you might ask?  Well, not only is he going to trike for over 3 miles to work on a super sized tricycle, but he is going to do it in a suit and tie, with an old time aviator skull cap and goggles. 

NO!  That is not all!

That is just the fun and zany part.  He is actually raising money for the troops by doing it.  Go to his site, or check him out on YouTube, and if you feel like being a part of some fun and giving to a good cause, then make a donation. 

Either way, you would have to see it to believe it!

Happy Coding.

STSADM : Export User Not Found Error

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.