Execute Non Query: IDENTITY_INSERT is already ON for table 'UiPathArchives.dbo.ArchiveLogs'. Cannot perform SET operation for table 'UiPathArchives.dbo.ArchiveJobs'

Hi,

I am trying to execute non-query for a SQL table. This case for Maintenance deleting old data Logged Messages

This error message I am seeing :
IDENTITY_INSERT is already ON for table ‘UiPathArchives.dbo.ArchiveLogs’. Cannot perform SET operation for table ‘UiPathArchives.dbo.ArchiveJobs’.

Can anyone help me understand what could be the cause of it? it for my client project, any quick help is much appreciated.

Thanks.

@Anggara_Rahmadhani

Check below for your reference

Hope this may help you

Thanks

Hi @Srini84

Ya that is my reference when I want to clean database.
But in this case, I want to clean db.jobs and I have some issue with this error:

IDENTITY_INSERT is already ON for table ‘UiPathArchives.dbo.ArchiveLogs’. Cannot perform SET operation for table ‘UiPathArchives.dbo.ArchiveJobs’.

I’ve already following the step of Maintenance Consideration link.

Thanks.