Use Flashback Query


SQL> select text from dba_source where name='ANAR_UPD_SALES' order by line;
TEXT
--------------------------------------------------------------------------------
procedure ANAR_UPD_SALES as
begin
for i in 1..10000 loop
update sales set amount_sold=amount_sold*1 where rownum<2;
commit;
end loop;
end;
7 rows selected.
SQL> drop procedure ANAR_UPD_SALES;
Procedure dropped.
SQL> connect / as sysdba
Connected.
SQL> select text from dba_source 
 as of timestamp systimestamp - interval '5' minute 
 where name='ANAR_UPD_SALES' order by line;
TEXT
--------------------------------------------------------------------------------
procedure ANAR_UPD_SALES as
begin
for i in 1..10000 loop
update sales set amount_sold=amount_sold*1 where rownum<2;
commit;
end loop;
end;
7 rows selected.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: