Restoring Stored Procedure!

Hi, I am new in database administration, please! suggest me the best method that help me to restore the stored procedures in SQL Server 2005.

If you have a backup, you simply open SQL Server Management Studio and choose Import Backup…

Sorry! I don,t have backup files. So please help me “Cheif”…!

If you don’t have a backup, you are out of luck. As there is likely no place for you to find those stored procedures if your database became corrupt.

Sorry, but you’ll have to try and find the dev who created the stored procedures and hope he has a copy.

Is there no script to recover the stored procedure?

Is your database still accessible? If so, yes, but if it isn’t, I highly doubt anything you do will get it back. You can search for Database Recovery Tools, but chances are, they will likely fail.

Yes, database is accessible.

Okay, if you can connect to it using SSMS, expand the database, expand Programmability, expand Stored Procedures, right click on the Stored Procedure and choose “Script Stored Procedure as…” and choose “DROP and CREATE”

Then you’ll have a script you can save locally or copy/paste, whatever you want to do.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.