• Grey Twitter Icon
  • Grey Facebook Icon
  • Grey LinkedIn Icon
  • Grey Google+ Icon

© 2016 - 2019 All rights reserved. PigeonSQL.com | Filip Holub

The Generate Script for sp_purge_jobhistory!

February 28, 2017

I have created a small script for generating sp_purge_jobhistory for my SQL jobs at work. The first part of script generate system store procedure for purge history of jobs where is condition (WHERE sjs.next_run_date = CONVERT(VARCHAR(10), DATEADD(dd, 0, @v),112)) - that means select all sql jobs which runs very often!


Script is below:


 Result looks like this.

(click the picture)


 Here is second part of the script.




See you next time!



Please reload

Please reload

  • Facebook Social Icon
  • Google+ Social Icon
  • LinkedIn Social Icon
  • Twitter Social Icon