Results 1 to 7 of 7
  1. #1
    Join Date
    Dec 2005
    Posts
    4

    Unanswered: Recovering Oracle9i Stored Procedures

    Hi,
    I have written an Oracle stored procedure in a package and had my colleague ovewritten my work accidentally - he was opening a session on the same database and same package -, we are using TOAD for oracle for development, any body knows how we can recover my version of that package? Please note that we don't have any source control associated with our database, can we find a solution thru the data dictionary or something like this? Any help will be appreciated.
    Thanks

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Unless you perform regular backup or save scripts in the file system, I'm afraid your code is lost until you rewrite it again. Good news is that you're supposed to do it faster now as you already have some experience regarding the problem procedure deals with.

    However, there's still hope that someone else will know a better solution.

  3. #3
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    If you have oracle 10g and have flashback enabled, you can use it to recover the altered data.
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  4. #4
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    Quote Originally Posted by LogicGuru
    Please note that we don't have any source control associated with our database
    ... but you will from now on, right?

  5. #5
    Join Date
    Sep 2004
    Location
    London, UK
    Posts
    565
    In 9i it is just possible to do something like this, as SYS:

    Code:
    SELECT source
    FROM   source$ AS OF TIMESTAMP (SYSTIMESTAMP - INTERVAL '1' DAY)
    WHERE  obj# = [object_id of your procedure from all_objects]
    ORDER BY line;

  6. #6
    Join Date
    Dec 2005
    Posts
    4

    Rewrite the Procedure!

    It is so funny I am replying to my self. I had to rewrite the procedure thanx for all reply guys. I agree with you moderator, I have to use version control from now on, any body knows a brilliant version control for Oracle9i with TOAD?
    Thanx

  7. #7
    Join Date
    Dec 2003
    Posts
    1,074
    TOAD comes with the ability to plug-in to a couple of different version control products. Talk to quest.com about it (look in the menu under Team Coding).

    We take a nightly export of our database (we're lucky it's small enough), and so we pull old versions of PL/SQL from there. It's not as accurate as Version Control software, but it works (plus we have a standard approach where we save the immediately prior version on our LAN when we modify).

    -Chuck

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •