I was reading trhough my blogroll today and noticed a very complete blog post for deploying SP2 in a large MOSS environment. It describes optimized steps for installing SP2 with lesser downtime as you would have by just installing it. Chris Givens is a SharePoint trainer. His Advanced SharePoint 2007 Operations course looks very interesting. Just a pitty that you have to go all the way to Seattle for it…. For us European trash guys, it is hard to defend that to our manager, right?
So please, read through this post as it may help you with your upgrade of your farm if you have large databases.
This is the original content of Chris’s Post that can be found at
built this lab for the latest update to my Advanced SharePoint Operations course. But I felt like it would benefit the entire community…so here you go! Good luck!
Module #25: Updating The Farm Lab #01
Course: SharePoint 2007 Operations Estimated Time to Complete: 45 minutes Objectives: · Upgrade to SP2 Operating Notes: · You will need sharepoint2007 and svr-sp2 images · Assumes that you are using SQL Server 2000/2005/2008 for your database server (Not Internal DB engine)
· None
|
Overview: Learn the steps of preparing your farm for upgrade and then performing the upgrade.
Exercise 1 – Prep the Farm
Purpose: There are a series of recommend steps that will speed up the upgrade of your SharePoint Farm. Following these somewhat simple suggestions will get you through the process much faster! Rebuilding indexes will ensure that the upgrade process will modify the database schemas and records as quick as possible. Truncating the log files will ensure that your backup and restores will run quickly. Detaching
Result: A farm ready for upgrade
Task 1 – Clean up the databases (rebuild indexes)
- Open SQL Server Management Studio
- Connect to your sharepoint database server
- Click “New Query”
- Run (press Atl-X) the following command on each SharePoint database (set the dropdown for each):
- WSS_Content*
- SharePoint_Config*
SELECT object_id, index_id, avg_fragmentation_in_percent, page_count
|
Task 2 – Check disk space on web and database servers
- On each web front end, open Explorer to “My Computer”, record your disk space. Make sure you have at least 300MB free for install of files
- On each database server, open Explorer to “My Computer”, record your disk space. Make sure that you have enough space to make a copy of your largest content database.
- Example: if you have three databases of size 10GB, 20GB and 30 GB. Make sure you have at least 30GB of free space on your DB server.
Task 3 – Backup the databases (truncate and backup)
- Create a folder called “D:\Backups”, ensure that you have enough disk space to save all your backups to this location (add the size of each database to determine how much you will need)
- Run the following commands TWICE for each database (this will shrink, backup and truncate your database and log files):
- WSS_Content*
- WSS_Search*
- SharePoint_Config
- SharedServices*
|
Task 3 – Evaluate Database Size
- If you designed your farm wrong, it is possible that you have a single web application with a single content database that contains all your content. This type of setup normally means you have a database that is going to get large very quickly and backup and restore operations, as well as future upgrades could take a considerable amount of time. It is suggested that you create more content databases and partition your site collections across multiple databases.
- You have two options to do this:
- Create another content database in the web application
- Create another web application with a new content database
- Create a new site collection in your port 100 site
- Open “Central Administration”
- Click “Application management”
- Click “Create Site collection”, ensure that you are on port 100 web application
- For Title, type “SC2”
- For URL, select “/sites/”, and type “SC2”
- For owner, type “administrator”
- Click “Ok”
- You will now have two site collections in your content database, you can use the following commands to backup a site collection, delete it and restore to a different web application (and hence a new content database):
|
- You can continue this process to load balance your site collections across multiple content databases and in essence distribute your database sizes so that upgrading will not be so painful.
- NOTE: you can only use a url once in a web application
Task 4 – Detach the content databases
- Open the “Central Administration” site
- Click “Application Management”
- For each web application in your web application list (EXCEPT central administration), do the following steps. NOTE: Click “Web Application List” to see them all:
-
- Click “Content Databases”
-
- You will see a list of content databases for the web application
- Click the database name
-
- Click the “Remove content database” check box
- Click “Ok”
- Click “Ok”
-
- Click “Ok”
- You should now see that the web application has no content databases:
- Again, do this for every web application EXCEPT the Central administration web application!
- NOTE: you may have several content databases…this may be a tedious task so you should likely follow step 5
- You can also create a command line utility to do this:
- Open Visual Studio
- Click “File->New Project”
- Select “Console Application”
- For name, type “ContentDetachAttachScript”
- Copy the following into the program.cs file:
|
-
- Compile the program, press F6
- Copy the executable to your SharePoint Farm
- Run the executable
- Open the C:\detachall.bat file , this file will contain all the stsadm commands that will detach all your content databases
- Open the C:\attachall.bat file, this contains all the stsadm commands to reattach your databases (NOTE: you should attach one at a time in the later steps).
Task 5 – Backup important files
- If running in a virtual environment, backup your front end webservers main image file. After doing this, you may skip the rest of these steps and head straight for upgrade!!!
- Web.config files for all web applications (located in WSS directory of wwwroot)
- Core Site definitions that were modified ( located in 12 hive template/sitetemplates directory)
- Any customizations including:
- Changes made to core.css
- Changes made to javascript files
- Pretty much anything you changed in the 12 hive…
Task 6 – Upgrade the servers (WSS)
- Stop IIS
- Open a command prompt, run “iisreset /stop”
- Run “d:\lab files\25_Lab01\ wssv3sp2-kb953338-x86-fullfile-en-us.exe”
- Click “Click here to accept…” check box
- Click “Continue”
- The service pack should start…:
- When the WSS update finishes, the Configuration Wizard will start:
- Click “Next”
- Click “Yes”
- Click “Next”
- Click “Ok” at the information popup, the farm will start to configure itself. This includes:
- Updating DLLs (gac)
- Creating/Updating registry keys
- Creating/Updating 12 hive information
- Updating web.config files
- Installing new features
- The install should finish:
- Repeat the above steps for the svr-sp2 image
Task 7 – Upgrade the servers (MOSS)
- Stop IIS
- Open a command prompt, run “iisreset /stop”
- Run “d:\lab files\25_Lab01\ officeserver2007sp2-kb953334-x86-fullfile-en-us.exe”
- Click “Click here to accept…” check box
- Click “Continue”
- The service pack should start…:
- When the MOSS update finishes, the Configuration Wizard will start:
- Click “Next”
- Click “Yes”
- Click “Next”
- Click “Ok” at the information popup, the farm will start to configure itself. This includes:
- Updating DLLs (gac)
- Creating/Updating registry keys
- Creating/Updating 12 hive information
- Updating web.config files
- Installing new features
- The install should finish:
- Repeat the above steps for the svr-sp2 image
Task 8 – Reattach the content databases
- Open the C:\attachall.bat file, run the attach command for each content database that you detached
- SharePoint will upgrade the database as it attaches it.
Task 9 – Verify Install
1. Open the upgrade.log file (in 12 hive LOGS directory)
o Look for “Finished upgrading SPFarm Name=<Name of Configuration Database>”
o Look for “In-place upgrade session finishes. Root object = SPFarm=<Name of Configuration Database>, recursive = True. 0 errors and 0 warnings encountered.”
2. If the above entries DO NOT exist, look for all instances of
o “fail”
o “error”
3. Check version number on:
o Owssvr.dll (in 12 hive isapi directory) should be “12.0.6421.1000”
o Registry “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0”
o Central administration
4. Check version of the sharepoint databases:
o Run the following sql command on each database:
|
o You should get “12.0.0.6421”
5. On Central Administration, click “Operations”
o Click “Servers In Farm”
o The version for the farm and servers should be “12.0.0.6421”
Task 10 – Check for SharePoint 2010 readiness
1. Run the following command:
|
2. Review the PreUpgradeCheck-*.htm file in the 12 hive logs directory (it should open in a browser window
3. You should watch out for the following items:
o The above command should be run on all Web Front end servers to ensure they are identical
o You should review the Site Definition information for any non “Internal” site definitions, these will need to have an upgrade definition file. Your developers will need to build this file for SP 2010
o If you have language packs installed, you will need to install the latest version when SP 2010 comes out
o Look for any referenced and missing features. Either install them or delete the references to them
o Depending on the type of upgrade to SP 2010 you do, you many need to plan for URL changes in your sites
o Review the Lists that have more than the recommends number of items. These could slow the migration process to SP 2010. Consider removing the list or deleting items to shrink the list size
o Review any Custom Field types that have been added to your Farm. CAML is not used in SP2010 and each of them will need to be re-developed with XSLT in mind.
o If you are running on 32 bit OS and Server 2003, you will need to start planning for migration to a 64bit server 2008 environment to run SP 2010
Question for anyone that’s already installed SP2 — if you have any 12 Hive customizations, what procedure did you use to check for overwrites and restore your customizations?
For example, I know that the ONET.XML at \TEMPLATE\GLOBAL\XML is getting overwritten, and ours is modified to provision our custom master page. I’ll be making a backup of our customized file, of course, but once the install is done, should I add the customizations into the new file, or overwrite the new file with my customized one?
Simple example I know, but I would just like to hear how other people are handling this.
Thanks!