Monday, April 27, 2009

Sharepoint 2007 version query

Ok, so you might wonder how to tell what version your Sharepoint 2007 farm is? Sometimes the Central Admin screen can show one thing, while dll's show a different thing, and even running a patch to completion doesn't necessarily mean you were upgraded (I found that out the hard way). The best way for sure is to query the database, and it will tell you where you started, where you've been and where you are currently.

Run this query against your SharePoint Config Database:
SELECT version FROM .dbo.versions

You will see several lines in the results, hopefully more than 4, if you dont see 5 at least, you need some patches in a bad way. Here are some of the results you may see for cumulative updates and service packs.
Service Pack 1
Version: 12.0.0.6219
3.0.7.0 (initial Database Schema)
3.0.10.0 (Current databas schema)

Service Pack 2
Version: 12.0.0.6421
3.0.8.0 (initial Database Schema)
3.1.3.0 (Current Database schema)

April Cumulative
12.0.0.6504
3.0.8.0  (initial Database Schema)
3.0.10.0 (Current Database schema)

No comments:

Post a Comment