---恢复费用类型科目映射分录
create table CT_BA_BillRelationEntry20240829 as select * from
(
select * from CT_BA_BillRelationEntry as of timestamp sysdate-18/1440 where fid not in ( select fid from CT_BA_BillRelationEntry )
)
---恢复费用类型科目映射
create table CT_BA_BillRelation0829 as select * from
(
select * from CT_BA_BillRelation as of timestamp sysdate-18/1440 where fid not in ( select fid from CT_BA_BillRelation )
)
---从备份表恢复
insert into CT_BA_BillRelation select * from CT_BA_BillRelation0829
insert into CT_BA_BillRelationEntry select * from CT_BA_BillRelationEntry0829
数据库回滚操作:
select * from CT_PRE_SpecialBillsApplication as of timestamp sysdate-10/1440;--(1440代表一天1440分钟,10代表10分钟之前的数据)
例如:CT_PRE_SpecialBillsApplication 表的单据状态 CFDjzt 字段被误操作更新错了
1,先创建一个临时表备份例如:CT_PRE_SpecialBillsApplication错误之前的数据做备份
create table CT_PRE_SpecialBillxxx as select CFDjzt from CT_PRE_SpecialBillsApplication as of timestamp sysdate-10/1440
2,检查无误后,将CT_PRE_SpecialBillsApplication表的数据从备份表更新
update CT_PRE_SpecialBillsApplication set CFDjzt=(select CFDjzt from CT_PRE_SpecialBillxxx where CT_PRE_SpecialBillxxx.fid=CT_PRE_SpecialBillsApplication.fid)