Before Christmas one of my clients had a major disaster with their SharePoint environment. Through implementing a good disaster plan we had backups of the databases and SharePoint farm. Unfortunately the server that went down was hosting the Central Administration. We decided to rebuild the environment and restore the content (sites).
When we restored the content database, we received an error about cannot install a newer version of SharePoint. After some googling and investigation we found out that the current SharePoint version was 12.0.0.4518 and the content database version was 12.0.0.6021.
We took a step back and evaluated what happened to the SharePoint environment since the clean install. SharePoint RTM starts out as 12.0.0.4518. We had applied a hotfix for security and the backup should of been taken at that state. So we applied the hotfix, the number incremented but didn't take it up to 12.0.0.6021.
After some more googling for any major public hotfixes and looking for the results, we managed to get the version up to 12.0.0.6020.
Our saviour was the October public update which incremented the version to 12.0.0.6039. The moral of the story is to implement governance on the SharePoint environment
- Keep track of updates to .NET and SharePoint.
- Only install a hotfix unless you really need it.
- Backup the SharePoint farm and databases as hotfixes can not be removed.
How do you find out what version of SharePoint you are running?
The first approach is to open a web browser and got to the site settings page (Site Actions > Site Settings > Modify All Settings).
The second approach is against the databases. Open SQL Server Management Studio, Connect to the server, new query, run the following:
SELECT [VersionId]
,[Version]
,[Id]
,[UserName]
,[TimeStamp]
,[FinalizeTimeStamp]
,[Mode]
,[ModeStack]
,[Updates]
,[Notes]
FROM [SharePoint_Config].[dbo].[Versions]
WHERE VersionId = '00000000-0000-0000-0000-000000000000'
ORDER BY Id DESC
This returns (columns reduced for readability):
| VersionId |
Version |
Id |
UserName |
Updates |
| 00000000-0000-0000-0000-000000000000 |
12.0.0.6219 |
4 |
MOSS\user |
3 |
| 00000000-0000-0000-0000-000000000000 |
12.0.0.4518 |
1 |
MOSS\user |
2 |
The top row is the latest version. The query is performed on the SharePoint Configuration database. If you have called this database something instead of "SharePoint_Config" change the query to reflect this.
You can also look at the versions for Content Databases, by changing the database name. For example: FROM WSS_Content_MySites.[dbo].[Versions]
SharePoint Version History for Public Releases
| Product |
Version |
| MOSS 2007 Cumulative update KB956056 & KB956057 |
12.0.0.6327 |
| MOSS 2007 Infrastructure Update KB951695 & KB951297 |
12.0.0.6318 |
| MOSS 2007 post SP1 hotfix KB948945 |
12.0.0.6303 |
| MOSS 2007 post SP1 hotfix KB941274 |
12.0.0.6301 |
| MOSS 2007 post SP1 hotfix KB941422 |
12.0.0.6300 |
| MOSS 2007 SP1 |
12.0.0.6219 |
| MOSS 2007 October public update |
12.0.0.6039 |
| MOSS 2007 August hotfix |
12.0.0.6036 |
| MOSS 2007 RTM |
12.0.0.4518 |
| MOSS 2007 Beta 2 TR |
12.0.0.4407 |
| MOSS 2007 Beta 2 |
12.0.0.4017 |
Hope this helps.
Update:
Penny has a good article about finding what version number you are running and the version history of SharePoint (v2 and v3) from beta to the current release http://mindsharpblogs.com/penny/articles/481.aspx. Thanks to Penny for publishing (and keeping up to date these version numbers).
Update:
You can also get the version from the API. Try using SPWebService.ContentService.Farm.BuildVersion. There is also SPGlobalAdmin.Version property but this shouldn't be used as its marked as obsolete.
Update:
And from Powershell ...
(get-item "hklm:software\microsoft\shared tools\web server extensions\12.0").getvalue("version")
12.0.0.6219