So last week I went and attempted an upgrade of my Sharepoint 2007 Enterprise install up to Service Pack 1. It didn’t go so smoothly you might say, and whomever wrote the upgrade routine for MOSS (Microsoft Office Sharepoint Server - Microsoft marketing at it’s best), needs to go through some basic programming and administration classes.
The install failed miserably halfway through upgrade with no recovery options and what initially sounds like a complete system loss. Read on to find out how to recover from a failed database and binary update by hand. This is not for the faint of heart.
First thing, stay calm and figure out what you have and how everything is laid out in your server farm.- Is your front end server separate from your database server
- Do you have good backups of your database
- Have you ran the setup and configuration utility and had it fail repeatedly
If you have good working backups of your database it’d probably be easier to just stop now, reinstall your front end server and re-attach it to your backed up databases and try again. If not (as was in my case where the backups showed as unrecoverable), you’re now in for a long night and most likely at least some lost data.
Your next step, read through the log file and determine if the error that occurred is correctable. The log file for setup is located by default in Program Files\Common Files\Microsoft shared\web server extensions\12\LOGS on your web front end server. I personally found the log file to be almost useless as it returned the result ‘An unknown error has occurred check this link for additional information’ with the link returning a 404 on TechNet.
So you’ve determined there’s no easy way out. And need to get your system back up and running ASAP.
-Make a manual backup of all databases on your SQL Server before continuing in case something goes wrong, we make no guarantees but this worked for me and after about 6 hr’s of total work my SharePoint server is living again with 0 reported errors.
SharePoint Version Numbers (used when manually changing version number to fix version drift):
Release 12.0.4518.1016
October public update 12.0.0.6039
Service Pack 1 12.0.0.6219
Post Service Pack 1 rollup 12.0.0.6300
Registry location of version information:
HKLM\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0
SQL Location of version information (all databases have this table)
VERSIONS table with the GUID of 00000000-0000-0000-0000-000000000000
SELECT * FROM Versions
Highest listed value is the database version. If your database is partially upgraded it may have version drift from your web front end server and cause them to no longer communicate properly.
Open up a cmd prompt on your web front end server and browse to \Program Files\Common Files\Microsoft Shared\web server extensions\12\Bin
Re-attempt the upgrade bypassing basic error messages like database already upgraded:
psconfig -cmd upgrade -inplace b2b -wait –force
This’ll attempt an in place upgrade to the new version of SharePoint again and can return more meaningful feedback than the GUI utility they give you.
If this fails (and it most likely will), go ahead and open regedit and go down to HKLM\SOFTWARE\Microsoft\Shared Tools\web server extensions\12.0\WSS. Then locate the SetupType key and edit it to have a value of CLEAN_INSTALL. This will reset your web front end configuration and allow you to re-connect it to your databases.
Next go back to your command prompt and run this command, filling in the blanks where needed with your information:
Rebind your frontend server to the backend databases to force it back into service:
psconfig -cmd configdb -connect -server (your database server) -database (databasename usually SharePoint_Config_Something) -user (account to log into the database with - hopefully a service account) -password (account password for the database) -cmd helpcollections -installall -cmd secureresources -cmd services -install -cmd installfeatures -cmd applicationcontent –install
Break down of command for those interested:
Psconfig is the command line version of the configuration wizard interface that SharePoint launches after setup.
Each –cmd is a break for separate commands were chaining together.
Configdb is the first command, here we are defining the database server, existing database used by the web application and the credentials for it.
Next we build in the help file collection into it so we can use help around the web application (why this isn’t here by default nobody knows).
Secureresources will go through your registry and file system resetting security back to how it’s supposed to be.
Services, does what it sounds like, it installs the services for SharePoint on the local system.
Install features is also pretty self-explanatory, it installs the SharePoint features into the site collection.
Last, we have applicationcontent which copies over shared application data to the web applications virtual directory for IIS.
Make note of any errors you get, when I did it initially I got a version mismatch error so I reduced the version number in my registry and on the database to pre-SP1 since I could not verify the amount of it which had been updated. (this step makes me cringe even thinking about it but it was the only way I could get it back to a functional level).
Refresh IIS so we can access the rebuilt web application:
This’ll make it so you have a usable website again, however this just gets it so it’s limping along again, then comes the fun part and likely configuration/data loss (though luckily not on your content databases, just your backend databases for SharedServices and Search).
Once all that runs through and it’ll take awhile you should be good for a breather before continuing. You’ll also need to repeat this last command with changes for each of your web applications with forward facing websites. Your primary web application is now up and running with the administration web application however. For any other web applications you’ll run the same command just replacing the database name with the content/configuration database for the other web application. I only have one forward facing web application so I didn’t have to bother with this.
Next go ahead and log into your administration page for SharePoint and verify everything is going again, if you find anything funky (search service we’ll get to in a bit), go ahead and repair it now.
-Search Service will most likely be stuck in starting at the moment and will have to be manually repaired using stsadm from the cmd line using the osearch command, we’ll get to that later.
Once you’ve verified your configuration you’ll probably be wondering why SharedServices no longer work, this is the bit where data loss comes in. I found it easier to redo my configuration of SharedServices and Search than to recover it using the steps outlined above. Since SharedServices is technically a separate web application they may work for it, but I decided having a clean database was more important than recovering system settings at this point.
First step, SharedServices relies on SharePoint Search and you cannot recreate a new services instance without first getting search back up and running. So go ahead into services.msc on the server and stop the SharePoint Search service, you can also restart the WSS Search if you want but it’s not needed.
Now, go back into your trusty command prompt window and do the following command:
Show current search service status:
stsadm -o list
This will list the status of the search service on the server, mine said unprovisioning which I thought was weird. However it’s supposed to look like this (which it does for me currently):
stsadm -o osearch -action list
Farm contact e-mail:
Farm service account: domain\username
Farm performance level: PartlyReduced
*Servername:
Status: Online
Role: IndexQuery
So now to get it back up and running we’ll run some more commands:
Set current server as index and search server:
stsadm -o osearch -f -role IndexQuery -farmcontentemail (I put in the IT Support email we use) -farmperformancelevel PartlyReduced -farmserviceaccount (Domain\username for running the service) -farmservicepassword (password for your service account)
Start search service:
stsadm -o osearch -action start
This should get your search service back up and running.
Next we need to get your Shared Service’s working again for this it’s just three more commands and then you get to redo all of your configuration for your shared services. Remember to make your databases beforehand through SQL Manager with the collation Latin1_General_CI_AS_KS_WS.
Create web application for shared services
stsadm -o extendvs -url servername:randomport -ownerlogin Domain\admin -owneremail farm@email -exclusivelyusentlm -databaseserver databasepassword -databasename (sharedservices db) -donotcreatesite -description SharedServices -apidname SharedServices -apidtype Domain\serviceaccount -apidpwd serviceaccountpassword
Create Shared Service Provider
stsadm -o createssp -title SharedServices -url servername:port -mysiteurl servername/MySite -ssplogin domain\serviceaccount -ssppassword serviceaccountpassword -indexserver servername -indexlocation “C:\Program Files\Microsoft Office Servers\12.0\Data\Office Server\Applications” -sspdatabaseserver databaseserver -sspdatabasename SharedServices_Content -searchdatabaseserver databaseserver -searchdatabasename SharedServices_Search -ssl no
Set Shared Services Provider as default
stsadm -o setdefaultssp -title SharedServices
If you’re uncertain about your index location it’s listed in grayed out text in your SharePoint Search service information under the Operations tab in central administration.
Next, you get to redo your search, profile import and audiences. Then you’re done.
Sometimes I truly hate SharePoint, if the upgrade routine had been written properly none of this would be needed.
Comments: (6)
on Mon, Feb 25th, 2008 at 04:50 PM
wow informative
on Mon, Feb 25th, 2008 at 08:56 PM
Thanks, this has helped me!!!
Dude on Thu, Mar 13th, 2008 at 07:54 PM
Dude you saved my ass!!! thank you
Bill Gates on Tue, Apr 15th, 2008 at 05:19 PM
Leave it to MS to put out a very crappy SP. That’s why I refuse to patch my SP. As a matter of fact, I’m thinking we should ditch MS and go with Oracle. God, as much as I hate to. MOSS can only get worse now.
on Fri, May 09th, 2008 at 10:41 PM
Thanks!It’s a great helpful for me!
on Wed, May 14th, 2008 at 11:24 AM
Thanks a lot for this information!
Page 1 of 1 pages


















Post Tags: microsoft sharepoint sp1 upgrade moss
Next entry: Edit another SharePoint List through WorkFlow Previous entry: Fixing users in sharepoint 2007 after account deletion or rename