SC Server - Unable to delete hosts - Foreign Key Constraint error
- Views:
- 208
- Visibility:
- Public
- Votes:
- 0
- Category:
- snapcenter
- Specialty:
- snapx
- Last Updated:
- 4/7/2025, 6:56:58 AM
Applies to
SnapCenter (All Versions)
Issue
A decommissioned plug-in host cannot be removed from SnapCenter, using the SC UI or PowerShell CMDlets, with the following errors seen:
DEBUG SnapManagerWeb_<Job_ID> PID=[xxxx] TID=[xxxx] Failed to remove file system resource. Details: Cannot delete or update a parent row: a foreign key constraint fails (`nsm`.`nsm_smsql_databasefile`, CONSTRAINT `FK_nsm_smsql_DatabaseFile_nsm_StorageFootprint` FOREIGN KEY (`nsm_StorageFootPrint_id`) REFERENCES `nsm_StorageFootprint` (`nsm_StorageFootprint_id`)
DEBUG SnapManagerWeb_<Job_ID> PID=[xxxx] TID=[xxxx] Failed to Remove SCW Resource: Cannot delete or update a parent row: a foreign key constraint fails (`nsm`.`nsm_smsql_databasefile`, CONSTRAINT `FK_nsm_smsql_DatabaseFile_nsm_StorageFootprint` FOREIGN KEY (`nsm_StorageFootPrint_id`) REFERENCES `nsm_storagefootprint` (`nsm_StorageFootprint_id`)
DEBUG SnapManagerWeb_<Job_ID> PID=[xxxx] TID=[xxxx] RemoveSCWResource - exit
DEBUG SnapManagerWeb_<Job_ID> PID=[xxxx] TID=[xxxx] Catch an exception in RemoveSCWResource: Cannot delete or update a parent row: a foreign key constraint fails (`nsm`.`nsm_smsql_databasefile`, CONSTRAINT `FK_nsm_smsql_DatabaseFile_nsm_StorageFootprint` FOREIGN KEY (`nsm_StorageFootPrint_id`) REFERENCES `nsm_StorageFootprint` (`nsm_StorageFootprint_id`)