Thursday, September 4, 2014

WSUS database error 'RESET SERVER NODE'



Number of times we faced this issue, but sometimes it works and sometimes not. So today I spent lots of time on this issue. and after that I logged a call to MS.  They just digging into this and provide us the way which solved our problem. Hope this solution will help you most of the colleagues.

Problem: when I am going to run server cleanup wizard after few minutes showing error like above.

Solution: 

  1. On the box first of all install SQL mgmt studio express edition (we have tried to connect it from a remote but no luck). 
  2. Then connect the SUSDB (as per my box the location is \\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query)
  3. Next run this below query.
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

4. Next execute this exec spGetObsoleteUpdatesToCleanup
5.  Last again try to run server cleanup wizard.

Note: Before trying it on the Production, recommended to try it on test first.



1 comment: