Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Another Instance_Del FK violation #957

Closed
dbloke opened this issue Jul 31, 2024 · 4 comments
Closed

Another Instance_Del FK violation #957

dbloke opened this issue Jul 31, 2024 · 4 comments
Labels
Completed DEV work completed. To be included in next release if issue is still open. defect Something is off and needs to be addressed Repository DB Database Project

Comments

@dbloke
Copy link

dbloke commented Jul 31, 2024

Msg 547, Level 16, State 0, Procedure dbo.Instance_Del, Line 435 [Batch Start Line 24]
The DELETE statement conflicted with the REFERENCE constraint "FK_RunningJobs_Instances". The conflict occurred in database "DBADashDB", table "dbo.RunningJobs", column 'InstanceID'.

We have a largish SQL estate (450+) with many different versions of SQL (2008R2 - 2022)

Occurred on an unpatched 2008R2 that would get memory dumps and stop the SQL service. Instance has been shut down for good and put out of its misery, but managed to leave behind a zombie row in the RunningJobs table!

Hope you don't mind us putting DBA Dash through its paces!

DavidWiseman added a commit that referenced this issue Jul 31, 2024
Fix:
The DELETE statement conflicted with the REFERENCE constraint "FK_RunningJobs_Instances". 
#957
@DavidWiseman
Copy link
Collaborator

Hi,

I have a PR that will fix this issue. If you want to try it out, you can replace the Instance_Del stored proc with this one from the pull request. #959

Thanks for reporting this,

David

@dbloke
Copy link
Author

dbloke commented Jul 31, 2024

Perfect, did the job. Thanks for the update.

DavidWiseman added a commit that referenced this issue Jul 31, 2024
Fix:
The DELETE statement conflicted with the REFERENCE constraint "FK_RunningJobs_Instances". 
#957
@DavidWiseman
Copy link
Collaborator

Great. Thanks for letting me know. The fix will be included in the next release.

@DavidWiseman DavidWiseman added defect Something is off and needs to be addressed Repository DB Database Project Completed DEV work completed. To be included in next release if issue is still open. labels Jul 31, 2024
@DavidWiseman
Copy link
Collaborator

Included in 3.8.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Completed DEV work completed. To be included in next release if issue is still open. defect Something is off and needs to be addressed Repository DB Database Project
Projects
None yet
Development

No branches or pull requests

2 participants