Is there a way to restore a previous version of a stored procedure in SQL Server?

I frequently use the right-click / Modify option in SQL Server Management Studio to pull up existing code in stored procedures in order to reuse the code. Only, this time I did that but forgot to remove the ALTER PROC piece of the code and modified an existing procedure.

Is there a way to restore the last version of a stored procedure without restoring the entire database? I have a saved .sql file that I can use to restore it, but I'm not sure how old that file is compared to the most recent version of the procedure.

Also, I'm not a DBA, more of a Jr-ish SQL Server DBA Developer. And our DBA is out for a couple weeks :)

I'm looking for a answer to my question,Any help here is appreciated! Thank you.

Tagged:

Answers

Sign In or Register to comment.