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: (initial Database Schema) (Current databas schema)

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

April Cumulative  (initial Database Schema) (Current Database schema)

No comments:

Post a Comment