I have many snapshot restorations in my instance. Due to which I can see there are orphan records (with Company ID in negative).
It’s on many tables, not just this one. Is there a process or best practice to clean this out? Or do we go table by table to run delete scripts to records that are not valid companyid.
Please suggest.
You can use the pp_DeleteCompany stored procedure to delete the orphan snapshots. Example: EXEC pp_DeleteCompany -1234567 (assuming the CompanyID is -1234567)