Took 13 hours and 19 minutes the second time I ran it and 30 minutes the
third time. All clean now.

On Wed, Nov 5, 2014 at 5:10 PM, Lindenfeld, Ivan <[email protected]>
wrote:

>  I didn’t offer up my script since Microsoft made me promise not to share
> it.  Hemsell’s script is identical.
>
>
>
> It will take a long time if you haven’t run it for a long time.  It was 2
> years for us and it took about 14 hours.
>
>
>
> It will run great when you are done.
>
>
>
> Ivan
>
>
>
>
>
> *From:* [email protected] [mailto:
> [email protected]] *On Behalf Of *Todd Hemsell
> *Sent:* Wednesday, November 5, 2014 5:35 PM
> *To:* [email protected]
> *Subject:* Re: [mssms] SUP maintenance SQL
>
>
>
> been running on my box for 12 hours. I am down from 7500 to about 4300
>
> I have 100 GIG of RAM and 12 processors. :-(
>
>
>
> On Wed, Nov 5, 2014 at 11:22 AM, Jason Wallace <[email protected]>
> wrote:
>
>  Thanks Todd
>
>
> On 5 Nov 2014, at 13:25, Todd Hemsell <[email protected]> wrote:
>
>  USE SUSDB
>
> 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
>
>
>
> On Wed, Nov 5, 2014 at 3:44 AM, Jason Wallace <[email protected]> wrote:
>
> Hi folks
>
> Have a customer who is having timeout issues with the WSUS console cleanup
> wizard and also with the PoSH scripts.
>
> I know that what we really are doing is calling a bunch of StoredProcs but
> does anyone have pre-canned SQL which I could use as a maintenance task
> please?
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>  ------------------------------
> NOTICE: The information contained in this message is proprietary and/or
> confidential and may be privileged. If you are not the intended recipient
> of this communication, you are hereby notified to: (i) delete the message
> and all copies; (ii) do not disclose, distribute or use the message in any
> manner; and (iii) notify the sender immediately.
>
>



Reply via email to