Help! Can I get it back?

  • Hello,

    I have been working on a stored procedure of some length, in Management Studio. I was testing it and placed an "END" statement partway through, to recompile and test just that portion. I accidentally closed that window in Management Studio. Is there a way I can get the extra code back (the code that had previously been part of the stored procedure, after the END I placed)?

    This isn't a production stored procedure, I'm developing. But, there was some time spent developing that extra section of code I lopped off. Since all modifications were performed via "ALTER PROCEDURE" statements, is there a record of the changes in the transaction log somehow, that I can recover?

    Thanks,

    Randy

  • Never mind - I remembered enough of the code to be able to recreate it and test it.

  • This is what you were looking for:

    http://www.sqlservercentral.com/articles/Backup+and+Recovery/restoringtoapointintime/1905/

    As an aside though, the begin/end statements are just another statement in the stored proc; Anything after the end is included in the text, and is available by altering (Modify) the stored proc or via sp_helpText



    Dan Guzman - Not the MVP (7/22/2010)
    All questions have to be prefaced by Server version and 'according to MS Docs' or 'my own personal opinion based on how much detail I felt like digging into at the time.'

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply