If using RS to replicate from CRM to Azure SQL DB, what's the best way to delete the "soft deleted" records from target tables, considering the tracking and logging done by Scribe?
Deleting those records from the database shouldn't cause any harm. I'm not aware of any logic in the Solution that would need those records.
@Philip Samuel are you aware of any known issues in RS when hard-deleting rows that have been soft-deleted?
Thanks, Nate. I'm a SQL Server developer and DBA, so I was not really asking HOW to delete records, but was more concerned with any issues that might arise if I just delete the records without touching the Scribe_ReplicationStatus table on the target, or the new_scribechangehistory entity on the source. Should I expect no problems with these reference tables if I just delete the DELETED_ON records from the target tables?
You can look at the deleted records where the SCRIBE_DELETEDON field is not null:
WHERE SCRIBE_DELETEDON IS NOT NULL
And then you can just turn that into a delete statement:
DELETE FROM [database].[dbo].[entityName]
WHERE SCRIBE_DELETEDON IS NULL
hope this helps.
Help others find useful posts by selecting the best answer to your question. Click "Like" to highlight great replies.