Wednesday, March 16, 2016

how-to-install-and-configure-system-center-updates-publisher AND wsus maintenance




https://blogs.technet.microsoft.com/sus/2014/12/10/how-to-install-and-configure-system-center-updates-publisher/


https://blogs.technet.microsoft.com/configurationmgr/2015/04/15/support-tip-configmgr-2012-update-scan-fails-and-causes-incorrect-compliance-status/
 



Make Sure we have a Backup of SUSDB before running the scripts.
 
Please run script on SUS DB for deleting obsolete updates:-
===========================
DECLARE @var1 INT
DECLARE @msg nvarchar(100)
 
CREATE TABLE #results (Col1 INT)
INSERT INTO #results(Col1) EXEC spGetObsoleteUpdatesToCleanup
 
DECLARE WC Cursor
FOR
SELECT Col1 FROM #results
 
OPEN WC
FETCH NEXT FROM WC
INTO @var1
WHILE (@@FETCH_STATUS > -1)
BEGIN SET @msg = 'Deleting ' + CONVERT(varchar(10), @var1)
RAISERROR(@msg,0,1) WITH NOWAIT EXEC spDeleteUpdate @localUpdateID=@var1 FETCH NEXT FROM WC INTO @var1 END
 
CLOSE WC
 
DEALLOCATE WC
 
DROP TABLE #results
===================
 
Reindex SUSDB:- Re-indexing of WSUS DB is a recommended task to maintain its performance.
Rebuilds all the indexes in a database:-
Exec sp_MSForEachtable 'DBCC DBREINDEX (''?'')'
Go
 
To update statstics:-
exec sp_msforeachtable 'update statistics ? with fullscan'
Go
 
 
 
Script for declining superseded updates:-
 
For Server CPU server utilization we will look forward to increase resources on the Box for site :- US-NWK-CMP01.am.elcompanies.net.

No comments:

Post a Comment