Sync failed: LocalDBOtherError: 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). Source: Microsoft.SystemsManagementServer.SoftwareUpdatesManagement.WSyncAction.WSyncAction.SyncWSUS
Resolution:
Clean the WSUS and maintain WSUS.
Here are two methods that should be used to maintain a WSUS hierarchy:
Re-index the WSUS 3.0 Database
http://gallery.technet.microsoft.com/ScriptCenter/en-us/6f8cde49-5c52-4abd-9820-f1d270ddea61
Run the Re-Index monthly. This can be run in any order within the hierarchy since it simply improves performance of WSUS database.
NOTE: In addition to the steps covered in the link above, the following changes may be required:
- If you are hosting the WSUS database (SUSDB) on a full SQL server instead of using Windows Internal Database (WIDS), you can simply run the re-index as a SQL query using SQL Management Studio
- On a Windows Server 2008 R2 server, you have to update the recommended command line to the following to get the script to work with WIDS:
You also have to install the SQL Native Client and the SQLCMD utility from http://www.microsoft.com/downloads/details.aspx?familyid=d09c1d60-a13c-4479-9b91-9e8b9d835cdc&displaylang=en
Run the WSUS Server Clean-Up Wizard
- You MUST run the WSUS Server Clean-up Wizard from the bottom of the WSUS hierarchy to the top and NEVER from the top down.
- You should run the WSUS Server Clean-Up Wizard throughout the hierarchy on a monthly basis. To help with this effort, you may want to automate the wizard using any of the following:
- PowerShell script sample for accessing the WSUS API for the cleanup functions: http://gallery.technet.microsoft.com/ScriptCenter/en-us/fd39c7d4-05bb-4c2d-8a99-f92ca8d08218
- Sample tool that handles the WSUS Cleanup wizard functions and offers a method to call the WSUSDBMaintenance script which can be useful if you run it as a scheduled task from the bottom of the hierarchy to the top on a monthly basis: http://wsus.codeplex.com/releases/view/17612
To run the Server Cleanup Wizard
In the WSUS administration console, select Options, and then Server Cleanup Wizard.
- By default this wizard will remove unneeded content and computers that have not contacted the server for 30 days or more. Select all possible options, and then click Next.
- The wizard will begin the cleanup process, and will present a summary of its work when it is finished. Click Finish to complete the process.
5 comments:
Thanks! running the WSUS cleanup wizard helped resolve my issue....
Thanks! I ran the WSUS cleanup wizard as a first step and was still having the issue. The issue was resolved after re-indexing the DB as you suggested in this post.
Note: I had to install SQLCMD from here: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=15748 and then use the following syntax with the latest version of SQLCMD: sqlcmd.exe -S \\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query -E -I -i c:\WSUS\WsusDBMaintenance.sql
I run the maintenance and re index weekly through task scheduler with a sbs 2011 server.
keeps everything running nice and smooth.
Be careful the first time you run the cleanup wisard. my suggestion is run each item "1" at a time as some items can take a while if you havent run it before. (Not unusual the first time to take a few hours)
First of all, thanks for this post, it helped me initially with my WSUS replication issue.
I made a mistake of selecting Drivers as one of the product categories that WSUS pulls from Microsoft. As a result, my WSUS database quickly bloated to 27,000 patches, 20,000 of which were driver definitions for various hardware IDs.
Bloated database started causing timeouts during replication runs. For a week or so, WSUS Cleanup Wizard and index defrags were helping. After a week or two, replication broke down completely.
Solution is to delete driver update definitions from the database - not just decline them. If you decline driver updates (or any other large collection of superseded or unneeded patches), you will start getting TdsParser timeout.
To delete driver definitions, run SQL scripts as described here: http://www.flexecom.com/how-to-delete-driver-updates-from-wsus-3-0/
If you already hid a ton of updates and are getting TdsParser timeout, run SQL scripts described here: http://www.flexecom.com/wsus-replica-server-fails-to-synchronize/
This issue was driving me crazy and these two articles fixed it for me; but needless to say, use at your own risk.
Dennis Suhanovs
www.flexecom.com
If you're using SQL Express 2012 the named pipes is different.
sqlcmd -S np:\\.\pipe\MICROSOFT##WID\tsql\query -E -I -i D:\SUSDBscript.sql
Post a Comment