系统运维.数据库.删除元数据
【问题描述】正常删除元数据操作如下图所示,但是某些未知原因的场景下,元数据无法正常删除,需手动处理。
【解决方案】
假定要删除的元数据的标识为【Jac_TestBill】,数据库执行以下SQL直接删除。
-- 元数据主数据 DELETE FROM T_META_OBJECTTYPE WHERE FID='Jac_TestBill' DELETE FROM T_META_OBJECTTYPE_L WHERE FID='Jac_TestBill' DELETE FROM T_META_OBJECTTYPE_E WHERE FID='Jac_TestBill' DELETE FROM T_META_OBJECTTYPENAMEEX WHERE FID='Jac_TestBill' DELETE FROM T_META_OBJECTTYPENAMEEX_L WHERE FENTRYID='Jac_TestBill' DELETE FROM T_META_OBJECTTYPEVIEW_L WHERE FID IN (SELECT FID FROM T_META_OBJECTTYPEVIEW WHERE FDEPENDENCYOBJECTID='Jac_TestBill') DELETE FROM T_META_OBJECTTYPEVIEW WHERE FDEPENDENCYOBJECTID='Jac_TestBill' DELETE FROM T_META_OBJECTTYPECACHE WHERE FID='Jac_TestBill' -- 基础资料相关 DELETE FROM T_META_OBJECTTYPEREF WHERE FOBJECTTYPEID='Jac_TestBill' DELETE FROM T_META_LOOKUPCLASS WHERE FID='Jac_TestBill' DELETE FROM T_META_BASEDATATYPE WHERE FBASEDATATYPEID='Jac_TestBill' DELETE FROM T_META_BASEDATATYPE_L WHERE FBASEDATATYPEID='Jac_TestBill' -- 单据相关 DELETE FROM T_META_NEEDTYPEBILL_L WHERE FBILLFORMID='Jac_TestBill' DELETE FROM T_META_NEEDTYPEBILL WHERE FBILLFORMID='Jac_TestBill' DELETE FROM T_META_NEEDTYPEBILLNAMEEX_L WHERE FENTRYID='Jac_TestBill' DELETE FROM T_META_NEEDTYPEBILLNAMEEX WHERE FBILLFORMID='Jac_TestBill' DELETE T_BAS_BILLTYPEFLDCTL_L WHERE EXISTS(SELECT 1 FROM T_BAS_BILLTYPEFLDCTL WHERE T_BAS_BILLTYPEFLDCTL_L.FENTRYID=T_BAS_BILLTYPEFLDCTL.FENTRYID AND EXISTS(SELECT 1 FROM T_BAS_BILLTYPE WHERE T_BAS_BILLTYPEFLDCTL.FBILLTYPEID =T_BAS_BILLTYPE.FBILLTYPEID AND T_BAS_BILLTYPE.FBILLFORMID='Jac_TestBill')) DELETE FROM T_BAS_BILLTYPEFLDCTL WHERE FBILLTYPEID IN (SELECT FBILLTYPEID FROM T_BAS_BILLTYPE WHERE FBILLFORMID='Jac_TestBill') DELETE FROM T_BAS_BILLTYPE_L WHERE FBILLTYPEID IN (SELECT FBILLTYPEID FROM T_BAS_BILLTYPE WHERE FBILLFORMID='Jac_TestBill') DELETE FROM T_BAS_BILLTYPE WHERE FBILLFORMID='Jac_TestBill' -- 编码规则相关 DELETE T_BAS_BILLCODES WHERE FRULEID IN (SELECT FRULEID FROM T_BAS_BILLCODERULE WHERE FBILLFORMID='Jac_TestBill') DELETE T_BAS_BILLCODERULEENTRY WHERE FRULEID IN (SELECT FRULEID FROM T_BAS_BILLCODERULE WHERE FBILLFORMID='Jac_TestBill') DELETE T_BAS_BILLCODERULE_L WHERE FRULEID IN (SELECT FRULEID FROM T_BAS_BILLCODERULE WHERE FBILLFORMID='Jac_TestBill') DELETE T_BAS_BILLCODERULE WHERE FBILLFORMID='Jac_TestBill' -- 发布相关 DELETE FROM T_BAS_FUNCTION_L WHERE FID IN (SELECT FID FROM T_BAS_FUNCTION WHERE FSUBFUNCID IN (SELECT FDETAILFUNCID FROM T_META_CONSOLEDETAIL WHERE FOBJECTID='Jac_TestBill')) DELETE FROM T_BAS_FUNCTION WHERE FSUBFUNCID IN (SELECT FDETAILFUNCID FROM T_META_CONSOLEDETAIL WHERE FOBJECTID='Jac_TestBill') DELETE FROM T_META_CONSOLEDETAIL_L WHERE FDETAILFUNCID IN (SELECT FDETAILFUNCID FROM T_META_CONSOLEDETAIL WHERE FOBJECTID='Jac_TestBill') DELETE FROM T_META_CONSOLEDETAIL WHERE FOBJECTID='Jac_TestBill' --其它 DELETE FROM T_SEC_OBJECTTYPEPERMISSION WHERE FOBJECTTYPEID='Jac_TestBill' DELETE FROM T_META_CONVERTLOOKUP WHERE FFLOWID='Jac_TestBill'
---------------------------------------------------------------------------------------------------------
【金蝶云星空BOS二次开发案例演示】https://vip.kingdee.com/article/94751030918525696
系统运维.数据库.删除元数据
【问题描述】正常删除元数据操作如下图所示,但是某些未知原因的场景下,元数据无法正常删除,需手动处理。【解决方案】假定要删除的元数据...
点击下载文档
本文2024-09-23 03:58:44发表“云星空知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-k3cloud-162320.html
您需要登录后才可以发表评论, 登录登录 或者 注册
最新文档
热门文章