Msg 1913, Level 16, State 1, Line 4
The operation failed because an index or statistics with name 'nclLocalizedPropertyID' already exists on table 'dbo.tbLocalizedPropertyForRevision'.
SQLServerName
registry entry on the WSUS server located at the HKEY_LOCAL_MACHINESoftwareMicrosoftUpdate ServicesServerSetup
subkey.##SSEE
or ##WID
in it, SUSDB is running in WID, as shown:C:WindowsWIDLog
and find the error log that contains the version number.C:WindowsSYSMSISSEEMSSQL.2005MSSQLLOG
and open up the last error log with Notepad. At the top, there will be a version number (for example 9.00.4035.00 x64). Look up the version number in How to determine the version, edition and update level of SQL Server and its components. This will tell you what Service Pack level it is running. Include the SP level when searching the Microsoft Download Center for SQL Server Management Studio Express..pipeMICROSOFT##WIDtsqlquery
..pipeMSSQL$MICROSOFT##SSEEsqlquery
.sqlcmd
can be used to run the reindex script. For more information, see Reindex the WSUS Database.-SkipDecline
parameter first, to get a summary of how many superseded updates will be declined.LOCALHOST
can be used in place of the actual SERVERNAME
):-SkipDecline
and -ExclusionPeriod 60
to gather information about updates on the WSUS server, and how many updates could be declined:spDeleteUpdate
stored procedure only removes unused updates and update revisions.spDeleteUpdate
.DECLARE @thresholdDays INT = 90
should correspond with the Supersedence Rules from step 1 of this procedure, and the correct number of days that aligns with the number of months that is configured in Supersedence Rules. If this is set to expire immediately, the value in the SQL query for @thresholdDays
should be set to zero.SQLCMD
mentioned earlier. If you go this route, it's important that you don't sync your WSUS servers/SUPs during this maintenance period! If you do, it's possible your downstream servers will just end up resyncing all of the updates you just attempted to clean out. I schedule this overnight before my AM sync, so I have time to check on it before my sync runs.-i
parameter is the path to the SQL script you saved in step 1, and the file specified after the -o
parameter is where you would like the log to be placed. Here's an example of what that might look like:'C:Program FilesMicrosoft SQL Server110ToolsBinnSQLCMD.exe' -S .pipeMicrosoft##WIDtsqlquery -i C:WSUSSUSDBMaint.sql -o c:WSUSreindexout.txt
Time | Tier | Tasks |
---|---|---|
12:00 AM | Tier1-Decline | |
12:15 AM | Tier2-Decline | |
12:30 AM | Tier3-Decline | |
1:00 AM | Tier3 WSUS Cleanup | |
2:00 AM | Tier3 Reindex | Tier2 WSUS Cleanup |
3:00 AM | Tier1-Cleanup | Tier2 Reindex |
4:00 AM | Tier1 Reindex |