SolveITProblems is a project of intellectual club

SolveITProblems это проект интеллектуального клуба

четверг, 15 ноября 2012 г.

Restore unsaved and lost PL/SQL code in SQL Developer

Hi guys, its realy a problem when you lose unsaved code. For about a month I have been working on a big procedure, and forgot to save the code in SVN. If you read this and remember  have such unsaved code, commit it immediately! :) Because everything could happen with your test db. Ok. you're lucky if you were using Oracle SQL Developer, because this program has a great feature - it saves your code in its sql history inspite of eating a big party of your RAM. Open your file explorer and locate this folder:

C:\Users\%USERNAME%\AppData\Roaming\SQL Developer\SqlHistory

You'll find a lot of xml files, and if you're twice lucky, you'll find your lost code. Its wonderful. :) .
If you're using another program, try to find feature like this and maybe it helps you. My condolences if this post doesn't help you, in any case, try to find something good among the next:
1) write your code again, and it will be better than before as you did it once
2) commit your code, so you'll not face such problem in the future
3) tell your friend a story for a beer :)

Enjoy Development!!!

9 комментариев:

  1. I want to kiss you .. i worked all day on some tricky dynamic sql code and then sql developer froze .. i can dry me tears now

  2. So emotionally :) I'm happy that my post helps you

  3. you just press F8 when you open SQL Developer and get your lost queries down there :)

  4. Please help me - I am on a Mac and don't know how to retrieve my file. It was due now - I workd on it all night! F8 does work...:(((

  5. If you had to "kill" your SQL Developer session and didn't get a chance to save your work... Try browsing to this location on your system to see if it's there...

    C:\Users\[username]\AppData\Roaming\SQL Developer\[sqldeveloper version]\.history

  6. Thank you so much for the rescue Vusal Khalilov. I was petrified.

  7. i cant find sql developer in roaming folder

  8. Not all heroes wear capes