From: Yitzak on
1. Have a SQL Agent Job that uses the option "log to table" - logs a
fair bit.

MSDB is getting huge, even though there are timed jobs to clear
history and logs.

A table called msdb.sysjobstepslogs takes up about 98% of space. There
was only one row

So I deleted it by running: EXEC msdb.dbo.sp_delete_jobsteplog
@job_name =####

Now the table has no rows - but is still as large and sysjobstepslogs
still 98% of spaceused.

There is a suggestion of truncate table sysjobstepslogs - but bit
fearfull. Tried Shrinking dbcc etc etc no joy

2. How does one actually look at what is logged in this table
From: David Hay on

It is probably relased, but the internal tables did not get updated
properly, so the 98% usage is incorrect.

Try running sp_updatestats, and sp_updateusage in msdb.

use msdb
go

exec sp_updateastats
go

dbcc updateusage('msdb') WITH COUNT_ROWS
go

Good luck!

David Hay
From: Yitzak on
On 22 Oct, 17:52, David Hay <david....(a)gmail.com> wrote:
> It is probably relased, but the internal tables did not get updated
> properly, so the 98% usage is incorrect.
>
Tried all sorts - including this

The mdf file is still large.


> Try running sp_updatestats, and sp_updateusage in msdb.
>
> use msdb
> go
>
> exec sp_updateastats
> go
>
> dbcc updateusage('msdb') WITH COUNT_ROWS
> go
>
> Good luck!
>
> David Hay

From: Russell Fields on
I don't know what version of SQL Server you are running, but you might try:

DBCC CLEANTABLE ('msdb', 'sysjobstepslogs')

RLF

"Yitzak" <terryshamir(a)yahoo.co.uk> wrote in message
news:5f805253-be89-4660-8a62-9c613b77d6b5(a)l35g2000vba.googlegroups.com...
> On 22 Oct, 17:52, David Hay <david....(a)gmail.com> wrote:
>> It is probably relased, but the internal tables did not get updated
>> properly, so the 98% usage is incorrect.
>>
> Tried all sorts - including this
>
> The mdf file is still large.
>
>
>> Try running sp_updatestats, and sp_updateusage in msdb.
>>
>> use msdb
>> go
>>
>> exec sp_updateastats
>> go
>>
>> dbcc updateusage('msdb') WITH COUNT_ROWS
>> go
>>
>> Good luck!
>>
>> David Hay
>

From: Yitzak on
On 22 Oct, 18:25, "Russell Fields" <russellfie...(a)nomail.com> wrote:
> I don't know what version of SQL Server you are running, but you might try:
>
> DBCC CLEANTABLE ('msdb', 'sysjobstepslogs')
>
> RLF
>
> "Yitzak" <terrysha...(a)yahoo.co.uk> wrote in message
>
> news:5f805253-be89-4660-8a62-9c613b77d6b5(a)l35g2000vba.googlegroups.com...
>
> > On 22 Oct, 17:52, David Hay <david....(a)gmail.com> wrote:
> >> It is probably relased, but the internal tables did not get updated
> >> properly, so the 98% usage is incorrect.
>
> > Tried all sorts - including this
>
> > The mdf file is still large.
>
> >> Try running sp_updatestats, and sp_updateusage in msdb.
>
> >> use msdb
> >> go
>
> >> exec sp_updateastats
> >> go
>
> >> dbcc updateusage('msdb') WITH COUNT_ROWS
> >> go
>
> >> Good luck!
>
> >> David Hay
Thanks Guys

Will try it - but I think clean table works if you have altered a
table and want space back straight away..