With all of these steps you would think this would be more automated or built in. The latest issue is now i couldnt access the windows internal database to run any kind of maintenance script. In the previous post we saw the installation and configuration of wsus 3. Software updates maintenance configuration manager. That will take about 2 hours of your time and a complete resync bandwidth and you are good to go. In that case, reindex with steps 2 and 3 first, then run. See if you can reclaim some space using conventional means. I can still see 1800 updates which are already declined and are published from aug 2008 to till date. The wsus administration console was unable to connect to the wsus server database. The script is intended to run as a scheduled task on wsus server. You mentioned that you could set this up as a maintenance plan. Weve deselected the option to download drivers but were still stuck with all the ones weve already grabbed.
Now we need to run the wsus db maintenance on the database to make sure were starting with an optimized database. Here are the three files required to defrag the wsus database and remove obsolete computers and updates. Lastly, but most important, it will run the recommended maintenance script on the actual sql database. By this point, you will hopefully have recovered a few gig of disk space. I finally go tired of cleaning up our wsus servers so i automated this task. However the action plan is still very much required. In my case, i still had the problem of the wsus database itself. If your wsus database is running windows internal database wid,then follow this guide and run the following sql command.
Execute the stored procedure query in the sql management studio. Add wsus index optimization to the database to increase the speed of many database operations in. If you run a windows server update services wsus server, you know that sometimes it can develop problems. Specifically the wsus database can need a manual clean up. A cleanup for software update configuration items in the configuration manager database occurs every seven days and removes unneeded updates from the console. I recommend following the guidelines at the article best practices with windows server update services 3. Can i, without having to reinstall wsus and the updates for it, clear the database, delete all wsuscontent, and start fresh with 0 approvals. Configmgr software update point cleanup microsoft cloud. Providing sussex and surrey it support, website design and web application development for over 15 years.
Note if a compatible version of sql server is not installed, wsus 3. Cm1511 has wsus cleanup feature integrated in sup properties. Solved delete wsus metadata clean database spiceworks. New clients will have to download the catalog and also clients falling over from one software update point to another, and size matters when dealing with slow wan links and thousands of clients. This database is located in the \wsus\updateservicesdbfiles folder, where is the local drive on which the wsus server software is installed. If youre struggling with getting your sccm software update point to sync with wsus, prepare yourself to see what ive done to fix it. Here are a few resources that can help when wsus goes bad. It will also give you the time taken for each wsus server to perform the cleanup, convert the freed diskpace value into a more useful gb value, and report any errors that occurred trying to perform the cleanup. Hi, here are the steps if you have installed wsus on server 2012r2 on the windows internal database to reset the database and wsus itself. Reindex the wsus database susdb by using the sql script from the scripting guys.
Your mileage is going to vary, but you simply have to keep the wsus database in shape, as well as declining unused updates. When trying to connect either via sqlcmd or sql management studio via my logged in windows. Wsus cleanup shrink a wsus database susdb to almost zero 1. It is always good validate the results before and after cleanup task. The complete guide to microsoft wsus and configuration manager. Run the recommended sql database maintenance script on the actual sql database. Clean up your wsus database for better performance and. Sudb reindexing and decline of superseded updates still is very important for effective management of software updates. This can happen if the database is very busy, if the database service is stopped, if the connection to the database is lost, of if the postinstallation task is not completed successfully. The expired updates option from the wsus cleanup wizard on the toplevel sites wsus server only. Microsoft wsus administrators sometimes tend to select all given products options products and classifications and by time the wsus content folder grows dramatically till it fill all disk space.
Hello friends today i am going to show you windows server 2012 r2. If you cannot complete a clean up of your wsus server through the wsus console because it keeps erroring out with server node reset, you can hopefully complete through the following powershell command line. The invokewsusservercleanup cmdlet performs the process of cleanup on a specified windows server update services wsus server. Wondering what you recommend for how often to run that. Clean up wsus the easy way step by step xenappblog. Not gonna shut down the server and have down time just to fix this. To repeat what i fundamentally stated in the previous. To schedule, copy to the local program files folder on the wsus server and use the task. Shrink your wsuscontent folders size by declining multiple types of updates including by default. For standalone wsus servers, or if you are using an older version of configuration manager, it is recommended that you run the wsus cleanup wizard periodically. Wsus automated cleanup script the script runs wsus cleanup tasks using stored procedures in wsus database directly, avoiding timeout errors and wsus service crash that may occur when using wsus cleanup wizard.
Standard problem with wsus cleanup wizard timing out without removing any unnecessary updates. If the wsus administrator tries to uncheck or deselect unneeded products later on, this wont save or minimize the current space. Use the appropriate method to back up the wsus database susdb. Then expand databases and you should see susdb and any other. I assume your wsus db is running on sql but not on windows internal database. This script will perform the wsus cleanup for any number of wsus servers, then send you a summary html email report. Why not create a powershell script to connect to the sql database and run. This post is on how keep your wsus database and instance clean of old updates and. This, in theory, should solve the last mile problem for the wsus cleanup wizard and make wsus run faster in general. This is because all database tables are being checked and any missing hotfixes are being marked for download. With the cleanup of wsus it can be quite a sensitive structure, and though this process can be automated i have the scripts and orchestrator runbook for it there are some things i think shouldnt be automated, at best perhaps semiautomated. How to setup wsus cleanup task from sccm console how to. Determine the sql server string, database name and the wsus content directory stop all wsus related services world wide web publishing service, wsus certificate server and.
Clean up your wsus database for better performance and sccm software update compliance 1. Clean up wsus content folder and reclaim your vmfs datastore at the same time. How to clean microsoft wsus content folder from old and. Windows server update services wsus uses two types of storage systems. Before configuration manager version 1806, the wsus cleanup option runs the following item. In most small deployments, wsus is configured using wid windows internal database which is essentially microsoft sql express. Wsus content store drive is full and wsus cleanup wizard fails. It would be best to stop the wsus service after this step. Clean up your wsus database from old package metadata information. Previously service was running on port number 8530 so i have configured all. Wsus windows server update services installation and configuration install wsus on server.
It will email the report out to you or save it to a file. Uninstall wsus and wid roles and features, remove the wid database files and reinstall the whole thing. On the database options page, select the software that is used to manage the wsus 3. House of cardsthe configmgr software update point and wsus. This ran perfect for many years i did have a problem in the past i use to run it once a month but that failed from time to time. You should still automate backup of wsus database along with reindexing of the. But, the cleaning up wsus is a very important activity for sccm admins to have healthy sup and sccm environment.
For more information about software update maintenance in configuration. Fixing wsus when the best defense is a good offense. Wsus error during cleanup wizard sql timeout payzeys. I found a partial answer on the following blog, but this answer will assume if the update is pending approval it is still required by a server wsus assumes this in their ui as well. The complete guide to microsoft wsus and configuration.
Runs a wsus database cleaup on sccm software update point servers where wsus is installed. Use the wsus cleanup tool to remove updates that are no longer needed. Until microsoft replaces wsus with something better, you have to do some housekeeping for wsus to behave. The steps to connect to susdb and perform the reindex differ, depending on whether susdb is running in sql server or windows internal database wid. This resulted in lots of pain for anyone running windows 7 x86 in their enterprise and eventually lead to microsoft updating the windows update agent. It will email the report out to you or save it to a file, or both. Note for more information about software updates in system center 2012 configuration manager. This is not part of the solarwinds software or documentation that you purchased from solarwinds, and the information set forth herein may come from third parties. Once the database is being backed up,run the following sql code against your wsus database. This process has the same impact as running the cleanup wizard from within the wsus console application and allows the specification of the same options as parameters. Im told the wsus product group plans to add the indexes steve and ben found in the next release. Before you install wsus, you should decide how you want to implement storage. Run wsus cleanup and index script on windows server core. If the wsus server cleanup wizard has never been run and the wsus has been in production for a while, the cleanup may time out.
Because it is a script, it can be automated for example, via the windows task scheduler. In that case, reindex with steps 2 and 3 first, then run the cleanup with only. Verify that sql server is running on the wsus server. Removing unused and obsolete updates from the database helps keeping the overall size of the catalog down to a minimum. How to run the wsus server cleanup wizard from commandline. There are two options to setup wsus cleanup maintenance scheduled task from sccm console. Software update maintenance in system center 2012 configuration manager. How to remove wsus completely and reinstall it aj tek. Keep in mind that you still need to do db maintenance on wsuss database just like you would any other. The service is stopped via the iis manager, as it runs as a web. Runs on top tier cas or lower tier primary site wsus servers. Enhancing wsus database cleanup performance sql script. The second issue is the windows update agent running out of memory mainly on windows 7 x86 systems. In the remove windows server update services pane, click database, click log files, click downloaded updates, and then click next.
Now normally with microsoft sql, youd simply connect remotely using the sql management studio, and you can if youre using fully blown microsoft sql server with your wsus implementation, however most of us arent. By default, the installation wizard creates and uses a windows internal database that is named susdb. Wsus cleanup this script performs the cleanup tasks done by the wsus cleanup wizard. The service is stopped via the iis manager, as it runs as a web site.
584 347 984 566 592 1469 636 953 655 122 1511 1079 1021 1562 1400 562 1580 336 704 1187 127 918 1600 58 657 579 898 375 908 1533 616 908 17 192 15 179 767 553 1377 184 1461 1176 1127 519 1309 696