Saturday, October 31, 2009

SharePoint 2007 Versions

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]