Job history file

  • Where is job history file logged? How many days the history files are logged by default?

  • MSDB database sysjobhistory table

    Not sure how many days the history files are logged by default. My guess would be no default.

    Maybe someone else knows....

  • Here is how you can look at what is current set up for job history:

    Enterprise Manager-->Server of interest -->management -->job system

    This will show the number of maximum job history log size row and the maximum job history rows per job.

    To answer the question of how long it will keep, it depends on how much you set it up and how many jobs you have schedule.

    There is also a way we could write sql statement to get this same info from registry as well if you have more then a handfull of server to check.

    mom

  • quote:


    Enterprise Manager-->Server of interest -->management -->job system


    Which version are you talking about? I don't see 'job system'...

  • sorry, let's try it again...

    Enterprise manager->server name->management->SQL Server Agent --right click, property -->Job system.

    This works on SQL 7 and SQL 2000.

    mom

  • Right clicking on SQL server agent and job system does give you the maximum job history log size (rows) and the maximum number of rows per job.

    Per the question from initial post it does not tell you how many days a job should be logged.In a similar vein if you create a job using the maintenance plan the details could be got by double clicking on the maintenance plan , clicking reporting then view history .This brings up all the listing of the jobs limited by a number of rows which you can change on the same screen. (default 1000 ) with a nice GUI feature enabling you to filter by server,status date message etc .On a similar note if you do hourly log backups like I do, sometimes you may want to reduce the backup information logged into the msdb database by running sp_delete_backuphistory from msdb and passing a date(date of the oldest backup you want to keep)

    HTH

    Mike

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply