Disappearing Stored Procs

  • I recently generated a Script for one of my databases and was stunned to find that the stored procedures were all appearing blank, i.e. there was nothing between the Create Procedure statement and the GO statement.

    I do not recall erasing any one of them, and I am sure noone in the office would do such a thing. And if they were deleted, why the Create statements?

    Any help appreciated.


    Regards,

    goodguy

    Experience is a bad teacher whose exams precede its lessons

  • if you have any backup of database (which contains your sp), then restore it and find your sp.

  • Hmm... strange.

    Is the db participating in replication or anything like.

    Try scripting once again and check if this gets repeated.

    "Keep Trying"

  • No, there is no replication whatsoever on our servers.

    I restored an October backup, and found the stored procedures appeared intact. But when I restored the last backup and tried to view the stored procs, I got a message that the said sproc had been moved and a request to Refresh the database in order to see them.

    And true enough, after refreshing the window, I could see all the store procs intact. Isn't it funny?


    Regards,

    goodguy

    Experience is a bad teacher whose exams precede its lessons

  • Is it possible that your stored procedures were created WITH ENCRYPTION (see BOL)?

  • No, sir, I have never used WITH ENCRYPTION in my sprocs.


    Regards,

    goodguy

    Experience is a bad teacher whose exams precede its lessons

Viewing 6 posts - 1 through 5 (of 5 total)

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