Well I've learned the hard way that when I run out of easy answers I need to check that my assumptions hold up 🙂 So mant times for me, the assumption I didn't challenge was the one that didn't hold up.
Assuming you tried the error checking like Sergiy mentioned - I would look at a few additional items (again - just hunting for now - we don't have a root cause as of yet):
- check for any references to IDENTITY_INSERT directives in your code.
- a few additional profiling checks that might help:
select ss_id from session
intersect
select sh_id from session_hist
select * from session_hist where sh_id=-1
edited for typoes
----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?