Quantcast
Channel: Forum SQL Server Database Engine
Viewing all articles
Browse latest Browse all 15889

What would cause the instance_id column of msdb.dbo.sysjobhistory to skip numbers?

$
0
0

The instance_id column of msdb.dbo.sysjobhistory is an identity column with increment to set 1. A few days ago on one my SQL 2000 servers, the column started skipping numbers. This is creating problems for a report that runs every night that checks whether my nightly maintenance job actually ran or not, and records the finish time.

The report (t-sql script) gets the instance_id for step 0, then queries the run_date/run_time columns from  instance_id-1 to get those values for the last step. It's worked for 6 years and works on a dozen other sql 2000 servers. On this one server however an instance_id number is now being skipped between the completion of the last step, and step 0.

What would cause this and how do I fix it apart from rewriting the t-sql (which will need to be done on at least a dozen servers to keep them in sync).

TIA


Chuck


Viewing all articles
Browse latest Browse all 15889

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>