We continue the sectionHelp for the administrator«
Due to the fact that the WSUS service is not critical and usually no one makes backup copies of the WSUS database (which is in SQL), and in the event of a crash of this database, reinstalling the entire service and re-downloading all updates is somehow not good, we had the idea to publish this article.
In case of complete loss of the database susbd (no backups) you need to do the following:
- Stop WSUS
- From the folder C:\Program Files\Update Services\Tools run the command .\Wsusutil.exe postinstall SQL_INSTANCE_NAME=”instance name” CONTENT_DIR=”drive letter:\WSUS”
The dot at the beginning is required. \" before wsusutil.exe, otherwise it won't work in PowerShell. For the default SQL instance, just enter the server name. You need quotes in the above command. This will run a post install that will install SUSDB, recreate the website on port 8530 (default) and remap everything to ContentDir. The post install command will create a log in the directory \AppData\Local\Temp which will look like tmp*.tmp. This log may be 0 KB for a while. It will also create another log named WsusUtilUseCustomWebSite.log. The website log will disappear if the website installation is ok, then tmp*.log will be written at that point. The tmp log will show you the tables, stored procedures, views and so on that are created/validated in SUSDB.
- Starting WSUS services
- Next, you need to reconfigure WSUS
- Performing synchronization
- In the logs during synchronization, you will receive an error
Warning WsusService.37 DBConnection.ExecuteCommandNoResult SqlException occurred. Number 50000 and message invalid update identity in XML for update
Do not be afraid after synchronization, these errors will go away