Recover dropped package / Procedure

I accidentally dropped a procedure on production database and We don't have an up to date copy of that code on Source Safe ( version control).


How to recover the dropped procedure?
LVL 1
vishali_vishuAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

slightwv (䄆 Netminder) Commented:
If this wasn't done that long ago try flashback query:

create table source_recovery as
(SELECT * FROM DBA_SOURCE AS OF TIMESTAMP ('03-OCT-11 8:00:00','DD-MON-YY HH24: MI: SS'));

Of course use a timestamp before the drop.

If this doesn't work, you will likely have to restore a backup on a different server.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
schwertnerCommented:
select text from dba_source
     as of timestamp systimestamp - interval '1500' minute
     where name='PROCEDURE_NAME_HERE' and type = 'PROCEDURE'
order by line asc;

adjust the clause
 '1500' minute
to point to the time just before you dropped the procedure

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.