Skip to main content

From The Field

Go Search
From The Field
  

From The Field > Categories
mergecontentdbs gotcha

Back in SharePoint 2007 Service Pack 1, a new command “stsadm –o mergecontentdbs” was released to help administrators move a site collection from one content database to another. (Despite its name it doesn’t actually merge content databases, just moves the data from one content database to another.) This was fine as long as the size of the site collection being moved was not too big.

 

It might take several hours to perform the whole move for a large site collection. Plus if for any reason the job crashed out during its run you could be left with orphans in either of your content databases or neither of them in working state. See http://support.microsoft.com/kb/969242/ for more information.

 

Recently I helped a customer upgrade their SharePoint system to SP2 with the June 09 Cumulative Update and once this was done, to move a 20Gb site collection to a new content database.

 

The move worked correctly and the “stsadm –o mergecontentdbs” command returned without error. Looking in the new content database I could see the data and an entry in the “sites” table which showed that this contentdb did in fact contain the moved site collection. Looking in the old contentdb at its “sites” table indeed showed that the site collection was gone.

 

So what was the problem?

 

It became clear that once the move was over, we were unable to shrink the size of the old content database. It still contained over 20Gb of data and I had no idea why it was still there.

 

Running a “stsadm –o databaserepair” command against the old content database showed 1000’s of orphans and upon closer inspection these where all individual sites (SPWeb objects) which had been part of the moved site collection. Running “stsadm –o databaserepair” this time again with the “-deletecorruption” switch did the job of removing the orphans after which we could shrink the old content database.

 

Therefore it would seem that the way the “stsadm –o mergecontentdbs” command works between SP1 and SP2 + June 09 CU seems to have changed. Indeed it seems to deliberately create orphans as part of the move.

 

After speaking to some of the guys on my team (hat tip to Andy D) the following blog posting came to light from the team at Microsoft who maintains the documentation you see on TechNet.

 

http://blogs.technet.com/tothesharepoint/archive/2009/05/21/3244169.aspx

 

It makes mention of the way the mergecontentdbs command was changed in the April 09 Cumulative Update and that it is now the default behaviour to leave the data in the old content database and rely on a new timer job to delete the data automatically in the background. The role of this job is to simply clean up orphans of a particular type which are generated as part of the call to mergecontentdbs.

 

In summary: Systems which have at least Service Pack 2 and the April 09 Cumulative Update will by default rely on a timer job to remove data from old content databases when the “stsadm –o mergecontentdbs” command is used to move a site collection from one database to another.

Installing SP1 for MOSS with additional Language Packs
Yesterday a colleague forwarded a question to me.
 

"We have installed MOSS 2007 and the MOSS Language Pack for French on the Servers. Two Front End Web Servers and a Indexing/Application Server. Which WSS and MOSS Service Packs do we need to install and in what order do the service packs need applying to the system."

 

So to answer the question:

 

I am assuming MOSS2007 base install is English/US and just the single MOSS language pack for French has been added.

 

Useful resources and pieces you will need

 

Base WSS SP1 - 32bit and 64bit - http://www.microsoft.com/downloads/details.aspx?FamilyId=4191A531-A2E9-45E4-B71E-5B0B17108BD2&displaylang=en

Base Moss SP1 - 32bit and 64bit - http://www.microsoft.com/downloads/details.aspx?FamilyID=ad59175c-ad6a-4027-8c2f-db25322f791b&DisplayLang=en

How to Install WSS Software Updates - http://technet2.microsoft.com/windowsserver/WSS/en/library/91649a7e-6b5a-4e5a-9ee5-51951f4b857f1033.mspx?mfr=true

How to Install WSS Software Updates - http://technet2.microsoft.com/Office/en-us/library/f484f5f2-35bb-4d70-bf56-dd1c4c287c721033.mspx?mfr=true

How to Deploy ALL MOSS Server Updates General Information - http://support.microsoft.com/kb/945013

Language Pack Download for WSS SP1 - http://www.microsoft.com/downloads/details.aspx?FamilyID=05046b1d-dd7b-456a-8838-8d978c5f3579&DisplayLang=en

Language Pack Download for MOSS SP1 - http://www.microsoft.com/downloads/details.aspx?FamilyID=3a6c26fd-0beb-40d5-8cba-15164faab150&DisplayLang=en

 Sequence

There is a generic sequence you can folllow for each of the updates. You have 4 service packs in total that need to be deployed to a total of 6 servers.

 

The running order is server hosting the central admin site followed by all the others.

 

The SP installation order is WSS SP1 > WSS Language Pack SP1 > MOSS SP1 > MOSS Language Pack SP1.

 

Although the suggestion below indicates you need to run the PSCONFIG utility after each service pack install strictly speaking that isnt true. In the case of a WSS SP1 and MOSS SP1 install you can install the WSS SP1 binaries immediately followed by the MOSS SP1 binaries. After both of these have been completed PSCONFIG can be used to upgrade the farm for both service packs. The reason I suggest running PSConfig for each SP is that in the event of an upgrade failure it will make troubleshooting that much easier.

 

For each Service Pack do the following

 

1. Disconnect users from the server farm by stopping the World Wide Web Publishing service (w3svc) on all Web servers.


2. Begin the software installation on the server hosting the central admin web site


3. At the end of the software update installation, the SharePoint Products and Technologies Configuration Wizard start

 

Note:  If the wizard does not start automatically, click Start, point to All Programs, point to Administrative Tools, and then click SharePoint Products and Technologies Configuration Wizard.
  
4. On the SharePoint Products and Technologies Configuration Wizard Welcome page, click Next.
 
5. In the dialog box that notifies you that some services might need to be restarted during configuration, click Yes.
 
6. On the Completing the SharePoint Products and Technologies Configuration Wizard page, click Next.
 
7. When the dialog box about installation in a server farm appears, do not click OK. Instead, leave each server with the following dialog box displayed: - THIS IS CRITICAL TO THE SUCCESSFUL INSTALL

 

You must run Setup to install new binary files for every server in your server farm. If you have multiple servers in your server farm, run Setup and the configuration wizard on the other servers now, and then return to this server and click OK to continue.

 

8. When the dialog box from the previous step is displayed on all Web servers in the server farm, use one Web server that hosts the Central Administration Web site to finalize the installation.
 
9. On the server you selected in the previous step (Step 2), click OK.
 
10. On the Configuration Successful page, click Finish.
 
11. Continue updating the remaining computers in the server farm, one at a time, by clicking OK in the dialog box.

Note:   It is important that the SharePoint Products and Technologies Configuration Wizard perform the configuration procedures on only one computer at a time.

Again, once the first farm member has completed the upgrade you can complete the upgrade on all the other machines in parallel since all the database upgrade steps have already been completed.

When the software update installation and configuration is complete on all the Web servers in the server farm, make the Web servers available to users by manually starting the World Wide Web Publishing service on each server on which you manually stopped the service.

OK after this you can move onto the next service pack in the list.

You can verify successful install of the servicepack by following this process after Step 10 above.

Verify installation
After you install a software update, you should verify that the installation was successful by reviewing the upgrade log file (Upgrade.log), as described in the following procedure.

 To view the upgrade log file
 
1.  Use Windows Explorer to navigate to the %COMMONPROGRAMFILES%\Microsoft Shared\web server extensions\12\LOGS folder.
 
2.  Use a text editor to open the Upgrade.log file.
 
3.  Scroll to the date on which you installed the software update.
 
4.  Search, or visually scan, for the following entries:

Finished upgrading SPFarm Name=<Name of Configuration Database>

In-place upgrade session finishes. Root object = SPFarm=<Name of Configuration Database>, recursive = True. 0 errors and 0 warnings encountered.

If you find these entries, the installation was successful.
 
5.  If you do not find the entries from the previous step, you can identify specific issues that may have contributed to the failure by searching, or visually scanning, through the Upgrade.log file for the following terms:

• fail
 
• error

After you identify and resolve the blocking issues, you must force a software update  

To force a software update
 
1.  Force a software update operation by opening a Command Prompt window and changing to the following directory:

%COMMONPROGRAMFILES%\Microsoft shared\web server extensions\12\bin\
 
2.  Type the following command:

psconfig –cmd upgrade –inplace b2b –wait –force
 
Happy Upgrading



Service Pack 1 Is Out There!

Windows SharePoint Services 3.0 with Service Pack 1

http://www.microsoft.com/downloads/info.aspx?na=22&p=1&SrcDisplayLang=en&SrcCategoryId=&SrcFamilyId=&u=%2fdownloads%2fdetails.aspx%3fFamilyID%3def93e453-75f1-45df-8c6f-4565e8549c2a%26DisplayLang%3den

Windows SharePoint Services 3.0 x64 with Service Pack 1

http://www.microsoft.com/downloads/info.aspx?na=22&p=2&SrcDisplayLang=en&SrcCategoryId=&SrcFamilyId=&u=%2fdownloads%2fdetails.aspx%3fFamilyID%3d9fb41e51-cb03-4b47-b89a-396786492cba%26DisplayLang%3den

Windows SharePoint Services 3.0 Service Pack 1 (SP1)

http://www.microsoft.com/downloads/info.aspx?na=22&p=3&SrcDisplayLang=en&SrcCategoryId=&SrcFamilyId=&u=%2fdownloads%2fdetails.aspx%3fFamilyID%3d4191a531-a2e9-45e4-b71e-5b0b17108bd2%26DisplayLang%3den

Windows SharePoint Services 3.0 Language Pack Service Pack 1 (SP1)

http://www.microsoft.com/downloads/info.aspx?na=22&p=4&SrcDisplayLang=en&SrcCategoryId=&SrcFamilyId=&u=%2fdownloads%2fdetails.aspx%3fFamilyID%3d05046b1d-dd7b-456a-8838-8d978c5f3579%26DisplayLang%3den

Windows SharePoint Services 3.0 Language Pack Service Pack 1 (SP1), 64-Bit Edition

http://www.microsoft.com/downloads/info.aspx?na=22&p=5&SrcDisplayLang=en&SrcCategoryId=&SrcFamilyId=&u=%2fdownloads%2fdetails.aspx%3fFamilyID%3dc7cf102b-5dd8-4d86-be5a-d56f63ef37a4%26DisplayLang%3den

The 2007 Microsoft Office Servers Language Pack Service Pack 1 (SP1)

http://www.microsoft.com/downloads/info.aspx?na=22&p=1&SrcDisplayLang=en&SrcCategoryId=&SrcFamilyId=&u=%2fdownloads%2fdetails.aspx%3fFamilyID%3d3a6c26fd-0beb-40d5-8cba-15164faab150%26DisplayLang%3den

The 2007 Microsoft Office Servers Language Pack Service Pack 1 (SP1), 64-Bit Edition

http://www.microsoft.com/downloads/info.aspx?na=22&p=2&SrcDisplayLang=en&SrcCategoryId=&SrcFamilyId=&u=%2fdownloads%2fdetails.aspx%3fFamilyID%3d56681742-7d2c-4a6f-9178-dacd32aadc6c%26DisplayLang%3den

The 2007 Microsoft Office Servers Service Pack 1 (SP1)

http://www.microsoft.com/downloads/info.aspx?na=22&p=3&SrcDisplayLang=en&SrcCategoryId=&SrcFamilyId=&u=%2fdownloads%2fdetails.aspx%3fFamilyID%3dad59175c-ad6a-4027-8c2f-db25322f791b%26DisplayLang%3den

 Error

Web Part Error: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe.

Error Details:
[UnsafeControlException: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe.]
  at Microsoft.SharePoint.ApplicationRuntime.SafeControls.GetTypeFromGuid(Guid guid)
  at Microsoft.SharePoint.WebPartPages.SPWebPartManager.CreateWebPartsFromRowSetData(Boolean onlyInitializeClosedWebParts)