ERROR
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
DESCRIPTION
The text of the message is:
"Windows Server Update Services error -- Web Page Dialog Windows Server Update Services encountered an error.
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
[Show Details] [Close]"
You see the following information in "Show Details", :
"System.Data.SqlClient.SqlException: Timeout expired. The timeout period
elapsed prior to completion of the operation or the server is not responding.
at
Microsoft.UpdateServices.DatabaseAccess.DBConnection.DrainObsoleteConnections(SqlException e)
<snip> updateId, Int32 revisionNumber, Int32 deploymentAction, Guid targetGroupId,
String adminName, DateTime deadline, Boolean isAssigned, DateTime goLiveTime,
Int32 downloadPriority, Guid deploymentGuid, Boolean translateSqlException)
at Administration.Updates.UpdateXPost.Page_Load(Object sender, EventArgs
e)"
Response from Rajiv Poonamalli [MSFT]:
We are currently in the process of addressing some of the performance issues in this area. The steps below would fix part of the performance problems you
are facing. Please try these on your server and let us know if it solves the timeout issues.
1) Save addDeploymentIndex.sql to disk on the Windows Server Update Services server
2) As administrator, run the following command.
osql -E -S <SQL instance name> -n -b -i addDeploymentIndex.sql
The osql utility can be found under the "%ProgramFiles%\Update Services\Tools\osql" folder. Provide the servername with the -S parameter. [Replace <SQL instance name with your SQL server if you are using SQL or %computername%\WSUS if you are using WMSDE]
Content of addDeploymentIndex.sql:
--------------------8<----------------------
USE SUSDB
GO
BEGIN TRAN
IF NOT EXISTS (SELECT * FROM sysindexes where name='nc7DeploymentRevision')
BEGIN
CREATE NONCLUSTERED INDEX nc7DeploymentRevision ON dbo.tbDeployment(RevisionID, TargetGroupID, ActionID)
END
COMMIT TRAN
GO
--------------------8<----------------------
Note that the text starting with "CREATE NONCLUSTERED " between the
BEGIN
...
END block needs to be one single long line, it will wrap over two
lines in this post.
If the WSUS server database (SUSDB) is not on the default SQL server instance on the machine, It is probably on a named instance. Look at the following registry key to find out which SQL server/MSDE server you have to run the command at.
HKLM\SOFTWARE\Microsoft\Update Services\Server\Setup\SqlServerName
You can replace the value of this key for the place holder in the command below.
David Hennessey (MSFT)
As for what this does, we found that the reason the approvals were taking so long was the query plan that SQL was choosing when we delete approvals in the DB (of course, the reason we are deleting approvals at all is another story, but that is something we'll try to fix in SP1) was quite inefficient because one of the pieces of data we were querying on wasn't indexed properly.
Creation of that index allows SQL to choose a much more performant query plan and in our tests reduced the deployment delete time 'significantly'.
Scripting guru Torgeir Bakken's response;
Torgeir Bakken (MVP):
It is easy to create this command line utility yourself. WSUS expose .NET API's that can be called from VB.NET, C#.NET, or other .NET languages.
The easiest way to develop .NET programs is to use Visual Studio, but VS is not required. The .NET Framework ships with all the basic tools necessary for building .NET programs.
To get a tool that starts a WSUS synchronization, do the following on the WSUS server:
1) Copy the code below and save it to a text file named
"StartSynchronization.vb"
2) Open a command prompt, and navigate to the directory containing
StartSynchronization.vb.
3) Run the following command line (all one one line, you will need to
unwrap the line before running it!):
%WINDIR%\Microsoft.NET\Framework\v1.1.4322\vbc.exe
StartSynchronization.vb /r:"%PROGRAMFILES%\Update Services\
service\bin\Microsoft.UpdateServices.Administration.dll"
/out:StartSynchronization.exe
This will create a tool called StartSynchronization.exe that when run
will start a WSUS synchronization.
Content of StartSynchronization.vb:
--------------------8<----------------------
Imports Microsoft.UpdateServices.Administration
Module StartSynchronization
Sub Main()
Dim server As IUpdateServer
Dim subscription As ISubscription
'connect to the local server
server = AdminProxy.GetUpdateServer
subscription = server.GetSubscription()
subscription.StartSynchronization()
End Sub
End Module
--------------------8<----------------------
More WSUS API information/examples:
"Windows Server Update Services API Samples and Tools" is available for
download here:
http://www.microsoft.com/windowsserversystem/updateservices/downloads...
and
Platform SDK: Windows Server Update Services
http://msdn.microsoft.com/library/en-us/wus/wus/portal.asp
--
There are many known scripts which use WMI class Win32_QuickFixEngineering to enumerate hotfixes installed on a computer. These scripts can give you a list of installed updates like;
1.
This Script reports installed updates that are installed with Windows Update (v5) technology and the result will be written to %temp%\UpdateHistory.txt and then launched in Notepad.
USAGE: Cscript //nologo WUhistory.vbs
The output will look like;
Report run at 4/23/2006 2:42:14 PM
------------------------------------------------------------------
Title: Security Update for Windows XP (KB908531)
Description: A security issue has been identified in Windows Explorer that could allow an attacker to compromise your Windows-based system and gain control over it. You can help protect your computer by installing this update from Microsoft. After you install this item, you may have to restart your computer.
Date/Time in GMT: 4/18/2006 7:47:14 AM
Install mechanism: AutomaticUpdates
Install status: Succeeded
------------------------------------------------------------------
'--------------------8<----------------------
' Script that reports installed updates that are
' installed with Windows Update v5 technology
'
' Result will be written to %temp%\UpdateHistory.txt
' and then launched in Notepad
'
' Author: Torgeir Bakken
' Date 2004-08-12
'
Option Explicit
Const OverwriteIfExist = -1
Const OpenAsASCII = 0
Dim oWU, iTHCount, colUpdate, oUpdate, sStatus, iTotal
Dim iSuccess, iFailed, iAborted, iUnknown, sErrorCode
Dim oFSO, oShell, sFile, f
On Error Resume Next
Set oWU = CreateObject("Microsoft.Update.Searcher")
If Err.Number <> 0 Then
MsgBox "WU5 programming interface does not exist.", _
vbInformation + vbSystemModal, "Update history"
WScript.Quit
End If
On Error Goto 0
iTHCount = oWU.GetTotalHistoryCount
If iTHCount > 0 Then
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oShell = CreateObject("Wscript.Shell")
sFile = oShell.ExpandEnvironmentStrings("%TEMP%") & "\UpdateHistory.txt"
Set f = oFSO.CreateTextFile(sFile, _
OverwriteIfExist, OpenAsASCII)
iTotal = 0
iSuccess = 0
iFailed = 0
iAborted = 0
iUnknown = 0
f.WriteLine "Report run at " & Now
f.WriteLine "---------------------------------" _
& "---------------------------------"
Set colUpdate = oWU.QueryHistory(0, iTHCount)
For Each oUpdate In colUpdate
f.WriteLine "Title:" & vbTab & vbTab & vbTab & oUpdate.Title
f.WriteLine "Description:" & vbTab & vbTab & oUpdate.Description
f.WriteLine "Date/Time in GMT:" & vbTab & oUpdate.Date
f.WriteLine "Install mechanism:" & vbTab & oUpdate.ClientApplicationID
sErrorCode = ""
Select Case oUpdate.ResultCode
Case 2
sStatus = "Succeeded"
iSuccess = iSuccess + 1
Case 4
sStatus = "Failed"
iFailed = iFailed + 1
sErrorCode = oUpdate.UnmappedResultCode
Case 5
sStatus = "Aborted"
iAborted = iAborted + 1
Case Else
sStatus = "Unknown"
iUnknown = iUnknown + 1
End Select
If sStatus = "Failed" Then
f.WriteLine "Install error:" & vbTab & vbTab & sErrorCode
End If
f.WriteLine "Install status:" & vbTab & vbTab & sStatus
f.WriteLine "---------------------------------" _
& "---------------------------------"
iTotal = iTotal + 1
Next
f.WriteLine
f.WriteLine "Total number of updates found: " & iTotal
f.WriteLine "Number of updates succeeded: " & iSuccess
f.WriteLine "Number of updates failed: " & iFailed
f.WriteLine "Number of updates aborted: " & iAborted
f.Close
oShell.Run "notepad.exe " & """" & sFile & """", 1, False
Else
MsgBox "No entries found in Update History.", _
vbInformation + vbSystemModal, "Update history"
End If
'--------------------8<----------------------
2.
This script enumerate hotfixes installed on a computer and outputs some computer information.
USAGE: Cscript //nologo HotfixHistory.vbs > HotfixHistory.txt
The output will look like;
Hotfix report date: 4/23/2006 2:45:19 PM
OS version: Microsoft Windows XP Professional
SP version: Service Pack 2
OS language: English
HotFixID: KB873339
Description: Windows XP Hotfix - KB873339
InstalledBy: Administrator
InstallDate: 12/11/2005
'
' Description: Script that outputs some computer information
' and lists all installed hotfixes including installation date
'
' Author: Torgeir Bakken
' Date: 2004-10-19
'
Wscript.Echo "Hotfix report date: " & Now & vbCrLf
strComputer = "." ' use "." for local computer
Const HKLM = &H80000002
'On Error Resume Next
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colSettings = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")
' get general info about the OS
' Caption value for different OS:
' Microsoft Windows 2000 ...
' Microsoft Windows XP ...
' Microsoft(R) Windows(R) Server 2003, ..... Edition
For Each objOperatingSystem in colSettings
strOSCaption = objOperatingSystem.Caption
Select Case True
Case InStr(1, strOSCaption, "windows 2000", vbTextCompare) > 0
strOS = "Windows 2000"
Case InStr(1, strOSCaption, "windows xp", vbTextCompare) > 0
strOS = "Windows XP"
Case InStr(1, strOSCaption, "windows(r) server 2003", vbTextCompare) > 0
strOS = "Windows Server 2003"
End Select
intOSLang = objOperatingSystem.OSLanguage
strOSLangHex = Right("000" & Hex(intOSLang), 4)
strOSServicePack = objOperatingSystem.CSDVersion
Next
Set objReg = GetObject("WinMgmts:{impersonationLevel=impersonate}!//" _
& strComputer & "/root/default:StdRegProv")
strOSLanguage = "Unknown" ' Init value
strKeyPath = "SOFTWARE\Classes\MIME\Database\Rfc1766"
strValueName = strOSLangHex
objReg.GetStringValue HKLM, strKeyPath, strValueName, strOSLanguage
' remove unnecessary stuff
arrOSLanguage = Split(strOSLanguage, ";")
strOSLanguage = arrOSLanguage(UBound(arrOSLanguage))
If Instr(strOSLanguage, "(") > 0 Then
arrOSLanguage = Split(strOSLanguage, "(")
strOSLanguage = Trim(arrOSLanguage(0))
End If
Wscript.Echo "OS version: " & strOSCaption
Wscript.Echo "SP version: " & strOSServicePack
Wscript.Echo "OS language: " & strOSLanguage
' start enumeration of hotfixes
Wscript.Echo vbCrLf & "Hotfixes Identified:"
strRegBaseUpdate = "SOFTWARE\Microsoft\Updates\" & strOS
Set colItems = objWMIService.ExecQuery _
("Select * from Win32_QuickFixEngineering",,48)
For Each objItem in colItems
If objItem.HotFixID <> "File 1" Then
Wscript.Echo "HotFixID: " & objItem.HotFixID
Wscript.Echo "Description: " & objItem.Description
Wscript.Echo "InstalledBy: " & objItem.InstalledBy
strInstallDate = Null ' init value
If objItem.ServicePackInEffect <> "" Then
strRegKey = strRegBaseUpdate & "\" & objItem.ServicePackInEffect _
& "\" & objItem.HotFixID
objReg.GetStringValue HKLM, strRegKey, _
"InstalledDate", strInstallDate
End If
If IsNull(strInstallDate) Then
strInstallDate = "(none found)"
End If
Wscript.Echo "InstallDate: " & strInstallDate
Wscript.Echo ' blank line
End If
Next
'--------------------8<----------------------
3.
I found this script in the community. Worth a try!
'--------------------8<----------------------
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colQuickFixes = objWMIService.ExecQuery _
("Select * from Win32_QuickFixEngineering")
For Each objQuickFix in colQuickFixes
Wscript.Echo "Computer: " & objQuickFix.CSName
Wscript.Echo "Description: " & objQuickFix.Description
Wscript.Echo "Hot Fix ID: " & objQuickFix.HotFixID
Wscript.Echo "Installation Date: " & objQuickFix.InstallDate
Wscript.Echo "Installed By: " & objQuickFix.InstalledBy
Next
'--------------------8<----------------------
4.
Very recently, I found this GUI utility by name WinUpdatesList.
- WinUpdatesList displays the list of all Windows updates (Service Packs and Hotfixes) installed on your local computer.
- For hotfix updates, this utility also displays the list of files updated with these hotfixes.
- In addition, it allows you to instantly open the Web link in Microsoft Web site that provides more information about the selected update, uninstall an update, copy the update information to the clipboard, or save it to text/HTML/XML file.
5.
You can also query list of updates /hotfixes installed by this simple command (one line). Replace 'server-name' with your server or your machine name;
wmic /node:'server-name' qfe GET description,FixComments,hotfixid,installedby,installedon,servicepackineffect
You can also output the result to a text / csv file;
wmic /node:'server-name' qfe GET description,FixComments,hotfixid,installedby,installedon,servicepackineffect > QFElist.txt
MORE INFORMATION
Qfecheck.exe Verifies the Installation of Windows 2000 / 2003 and Windows XP Hotfixes
http://support.microsoft.com/?kbid=282784
Alternatively, take a look at the Microsoft Baseline Security Analyzer (MBSA)
http://microsoft.com/mbsa
WinUpdatesList v1.12
http://www.nirsoft.net/utils/wul.html
List Installed Service Packs and Hot Fixes
http://www.microsoft.com/technet/scriptcenter/csc/scripts/software/update/cscsw030.mspx
Create a Task to Display Service Packs & Hotfixes in MOM Operator Console
http://msmvps.com/blogs/athif/archive/2006/04/23/Create_a_Task_to_Display_Service_Packs_Hotfixes_in_MOM_Operator_Console.aspx