标签:sel dml decode time procedure user RoCE Owner from
下面是本人平时工作中积累的一些常用的操作,非常简单实用,分享给大家.
select * from 误删除的表名 as of timestamp(systimestamp-interval ‘10‘ minute);--此处的10代表10分钟前表中的数据,可以根据实际情况进行查询
select *
from (select u.name AS username,
o.name AS procedurename,
decode(o.type#,
7,
‘PROCEDURE‘,
8,
‘FUNCTION‘,
9,
‘PACKAGE‘,
11,
‘PACKAGE BODY‘,
12,
‘TRIGGER‘,
13,
‘TYPE‘,
14,
‘TYPE BODY‘,
‘UNDEFINED‘) AS sptype,
s.line AS LINE,
s.source codetext
from sys.obj$ o, sys.source$ s, sys.user$ u
where o.obj# = s.obj#
and o.owner# = u.user#
and (o.type# in (7, 8, 9, 11, 12, 14) OR
(o.type# = 13 AND o.subname is null))
and u.name = ‘数据库用户名需要大写‘) as of timestamp(systimestamp - interval ‘21‘ minute) --按照时间进行闪回操作 此处为21分钟前的状态
where sptype = ‘PROCEDURE‘; --也可以单独查询FUNCTION、PACKAGE等
标签:sel dml decode time procedure user RoCE Owner from
原文地址:https://www.cnblogs.com/LoveShare/p/10251729.html