Deleting orphan records created by Snapshot restore

痴心易碎 提交于 2019-12-11 23:17:16

问题


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.


回答1:


You can use the pp_DeleteCompany stored procedure to delete the orphan snapshots. Example: EXEC pp_DeleteCompany -1234567 (assuming the CompanyID is -1234567)



来源:https://stackoverflow.com/questions/55494912/deleting-orphan-records-created-by-snapshot-restore

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!