Share via


How to quickly compare file version information across your MOSS farm

  1. 6/1/2009, 5:10 PM

  2. I often find myself in a situation where I need to quickly compare multiple servers to determine if the same version of the product has been installed on all machines. The easiest way to do this, at least for me, involves:

    1. SPSReport (https://www.codeplex.com/spsreport)
    2. Log Parser (https://www.microsoft.com/downloads/details.aspx?FamilyID=890cd06b-abf8-4c25-91b2-f8d975cf8c07&displaylang=en)
    3. Excel pivot table
  3. First, you want to obtain an SPSReport (LITE) from all of the servers in question. You are primarily concerned with the following files:

    • %COMPUTERNAME%_WSEVer.txt (WSS)
    • %COMPUTERNAME%_MOSSVer.txt (MOSS)
    • %COMPUTERNAME%_GacVer.txt (GAC)
  4. Using the following Log Parser script and command, I am able to quickly generate version data for each:

  5.    1: --
    
      2: -- Logparser file:SPSReportFilever.sql?source=Server1_WSEVer.txt,Server2_WSEVer.txt+destination=WSEVer.csv -i:TEXTLINE -o:CSV
    
      3: --
    
      4: SELECT
    
      5:     SUBSTR(TEXT, 22, 14) AS FileVersion,
    
      6:   LTRIM(SUBSTR(TEXT, 41, 10)) AS FileSize,
    
      7:   SUBSTR(TEXT, 52, 10) AS FileDate,
    
      8:  SUBSTR(TEXT, 63) AS FileName,
    
      9:  EXTRACT_TOKEN(EXTRACT_TOKEN(EXTRACT_FILENAME(LogFilename),0,'.'),0,'_') AS ComputerName
    
     10: FROM
    
     11:     %source% TO %destination%
    
     12: WHERE
    
     13:     INDEX_OF(TEXT,'-') = 0
    
  6. Save the above script in a file. Let's call it SPSReportFilever.sql. You will want to execute the following command from a DOS prompt for each grouping: WSS, MOSS, and GAC:

  7. Logparser file:SPSReportFilever.sql?source=Server1_WSEVer.txt,Server2_WSEVer.txt+destination=WSEVer.txt -i:TEXTLINE -o:CSV

  8. This, in turn, will produce a csv file with the following content:

  9. This will allow us to easily import this into an Excel spreadsheet and then perform a simple pivot operation.

  10. Import the csv into excel 

    clip_image002

  11. Now, let's Format as Table to make it easier to view, sort, etc.

    clip_image003

  12. Now, we're going to create a pivot table to arrange the data into an even easier format to see what versions are installed where

    1. Create PivotTable

    clip_image004

    1. Next drag the fields according to the followingimage

    2. This gives us a pivot table that looks like the following. However, we still have some slight adjustments to make to it clip_image006

    3. Next, we want to add some additional detail. Double-click on the one of the FileNames on the right. A dialog will appear asking what detail you would like to show. Select FileVersion and hit OKclip_image007

    4. This results in a change on the left side. Now, all of the FileNames have a version number under each of them. Now, let's make a couple of adjustments to make things easier to view

      1. Remove the Grand Total column clip_image008
    5. Freeze Panes to allow us to see the server name and file name clip_image009

    6. Now, let's expand one of the File Names. In our example, we choose microsoft.office.excel.server.webservices.dll. We see the following:clip_image010

    This tells us that the same version of this dll is installed on all of servers in our farm. What if it had not been? What would that look like?

    1. As can be seen from the same procedure on the MOSS file versions, we have a situation where one of the servers did not receive the appropriate updates clip_image011

    As we see here, SERVER2 is running a version of mssrch.dll that is significantly behind the version that is running on all of the other machines in the farm. Further investigation reveals that the SERVER2 did not have the MOSS April 2009 CU applied to it while other machines in the farm DID have the April 2009 CU applied. We applied the MOSS April 2009 CU to SERVER2 and our issues were resolved

Comments

  • Anonymous
    February 11, 2010
    Great Details, Mike! I tried with the SQL query [just copy pasted the code] but it failed with this error: Error: Syntax Error: <select-clause>: no SELECT keyword Given that, I made the SQL file to look something like this one below and that helped to get rid of the error: SELECT SUBSTR(TEXT, 22, 14) AS FileVersion,LTRIM(SUBSTR(TEXT, 41, 10)) AS FileSize,SUBSTR(TEXT, 52, 10) AS FileDate,SUBSTR(TEXT, 63) AS FileName,EXTRACT_TOKEN(EXTRACT_TOKEN(EXTRACT_FILENAME(LogFilename),0,'.'),0,'_') AS ComputerName FROM %source% TO %destination% WHERE INDEX_OF(TEXT,'-') = 0 Thanks again for this great blog!