Monday, November 16, 2009

Running stsadm -o preupgradecheck

In Windows SharePoint Services 3.0 service pack 2, two new commands were added to stsadm to help determine whether your installation is ready for an upgrade to SharePoint 2010:
  • Preupgradecheck - Runs a set of rule checks to determine whether your installation is ready for upgrade to SharePoint 2010.
  • Enumallwebs - Displays the ids and site map status for all site collections and subsites in the content database.
How do I run preupgradecheck?
  • Login to one of your SharePoint servers
  • Open a cmd prompt and navigate to c:\Program Files\Common Files\Microsoft Shared\Web Server Extenstions\12\Bin
  • type "stsadm -o preupgradecheck"
What output will I get?
  • You should get something like this:
  • In addition to the cmd output, you will get an htm file that details information about your installation and any problems found.
What if I fail a check?
Microsoft has issued a knowledge base article that is fairly comprehensive about the rule checks and the types of problems you may encounter. You can find it here: http://support.microsoft.com/kb/960577. It doesn't cover every possible scenario, though. If you have a problem that you can't figure out, feel free to post a comment and I will try to help.

Does Preupgradecheck change my site in any way?
No. It is read only.

How do I run Enumallwebs?
  • Login to one of your SharePoint servers
  • Open a cmd prompt and navigate to c:\Program Files\Common Files\Microsoft Shared\Web Server Extenstions\12\Bin
  • type "stsadm -o enumallwebs -databasename [contentdb]" Replace [contentdb] with the name of your content database.
What output will I get?
  • You will get xml output to the cmd screen. Something like this:

How do I redirect stsadm output to a file?
It might be helpful to redirect your enumallwebs output to a file. Here is how you do it:
  • Login to one of your SharePoint servers
  • Open a cmd prompt and navigate to c:\Program Files\Common Files\Microsoft Shared\Web Server Extenstions\12\Bin
  • Type "stsadm -o enumallwebs -databasename [contentdb] > output.xml 2>&1" Replace [contentdb] with the name of your content database.
  • This will output your xml to a file called "output.xml" in the same directory.
Additional Notes
  • You should run preupgradecheck on every server in your SharePoint farm. It does several server-specific checks.
  • Enumallwebs has an important field called "InSiteMap" that tells you whether a web is listed in the SiteMap. If a particular web is not listed in the SiteMap, it will have a value of "false" and the preupgradecheck will fail on the "ContentOrphan" step because you have an orphaned site.

No comments:

Post a Comment