Flashback technology has been around for quite awhile. However, today was the first day I actually ever had to use it in a real life scenario. Does that mean I am lucky or not?
A few minutes ago developer came by and asked if Oracle kept versions of pl/sql code in the database. I replied no and asked why. Turns out that he was working on some code, compiled it, etc and it didn’t work properly. He didn’t have a copy of the original package.
I wasn’t sure if it would work but I thought I would give flashback query a try. Here is the SQL I used:
1 select text from all_source
2 as of timestamp
3 to_timestamp('29-MAY-2012 15:50:00', 'DD-MON-YYYY HH24:MI:SS')
4 where type = 'PACKAGE BODY' and name = 'MYNAME’
I saved the output and sent it over to the developer. He was very happy. Always nice to end a day on a high note!
1 comment:
Post a Comment