October 30, 2009 at 7:06 am
how can i delete the records from sysjobhistory table in msdb
which is older than 30 days.can u pls tell me the query to do this
October 30, 2009 at 7:52 am
That's useful information. Why do you want to delete it ? Most of the time the question is about getting more history info, not less.
October 30, 2009 at 8:02 am
Right click agent, choose properties. There's a history tab. You can limit by rows or size, and remove history older than xx days.
October 30, 2009 at 8:05 am
You can also do the same in TSQL by executing sp_delete_backuphistory
October 30, 2009 at 8:11 am
That's useful information. Why do you want to delete it ? Most of the time the question is about getting more history info, not less.
I agree that is useful Information but some servers have too much of information about these and I have seen many Managers saying the last 4 weeks Data be suffice.
Another way doing this is having a Maintenance Plan and have Clean History task delete it for you.
Blog -- LearnSQLWithBru
Join on Facebook Page Facebook.comLearnSQLWithBru
Twitter -- BruMedishetty
October 30, 2009 at 8:15 am
Ian Scarlett (10/30/2009)
You can also do the same in TSQL by executing sp_delete_backuphistory
is this Stored procedure used to delete the history of jobs?????
October 30, 2009 at 8:16 am
Steve Jones - Editor (10/30/2009)
Right click agent, choose properties. There's a history tab. You can limit by rows or size, and remove history older than xx days.
i am using sql server 2000...there is no option to remove the history o;lder than XX days..i think it is avai;lable in 2005
October 30, 2009 at 8:16 am
Bru Medishetty (10/30/2009)
That's useful information. Why do you want to delete it ? Most of the time the question is about getting more history info, not less.
I agree that is useful Information but some servers have too much of information about these and I have seen many Managers saying the last 4 weeks Data be suffice.
Another way doing this is having a Maintenance Plan and have Clean History task delete it for you.
I think that answer was a mistake.
October 30, 2009 at 8:23 am
shanila_minnu (10/30/2009)
Ian Scarlett (10/30/2009)
You can also do the same in TSQL by executing sp_delete_backuphistoryis this Stored procedure used to delete the history of jobs?????
No, it's not... ignore me, I got my wires crossed:Whistling:
October 30, 2009 at 8:27 am
homebrew01 (10/30/2009)
Bru Medishetty (10/30/2009)
That's useful information. Why do you want to delete it ? Most of the time the question is about getting more history info, not less.
I agree that is useful Information but some servers have too much of information about these and I have seen many Managers saying the last 4 weeks Data be suffice.
Another way doing this is having a Maintenance Plan and have Clean History task delete it for you.
I think that answer was a mistake.
Hey homebrew01, That answer is not a mistake, I request you check before saying that its a mistake, Please take a took at the Image attached.
Does that not show it is a History Cleanup Task and is it not Maintenance Plan????
Blog -- LearnSQLWithBru
Join on Facebook Page Facebook.comLearnSQLWithBru
Twitter -- BruMedishetty
October 30, 2009 at 8:39 am
I meant to quote that running sp_delete_backuphistory was a mistake ..... So I was mistaken about mistakes ..... ooops....:blush:
October 30, 2009 at 8:54 am
Ok got it..
You know what? The irony is the question was meant to be posted in SQL 2000 and the by mistake the user posted has posted in SQL 2005 Forum.. 🙂
Any way if it help some one else thats job done
Blog -- LearnSQLWithBru
Join on Facebook Page Facebook.comLearnSQLWithBru
Twitter -- BruMedishetty
Viewing 12 posts - 1 through 11 (of 11 total)
You must be logged in to reply to this topic. Login to reply