|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Wednesday, July 22, 2009 8:17 AM
Points: 10,
Visits: 25
|
|
Hi
Is there any way to retrieve the previous version of a stored procedure after compilation and closing the window?
please please help
regards pooja
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 4:15 PM
Points: 37,651,
Visits: 29,903
|
|
Find a backup of the DB that has the version of the proc that you want. Restore that alongside the existing DB and then script out the procedure
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter We stand on the bridge and no one may pass
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Tuesday, May 14, 2013 4:08 AM
Points: 113,
Visits: 624
|
|
Using the same DB... I mean without using backup ... we cant restore a stored procedure to the previous version.
As Gail Shaw mentioned if you have backup of the database where you have the previous version of the procedure you can restore using the backup.
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Monday, November 26, 2012 3:25 AM
Points: 1,389,
Visits: 596
|
|
Gauthama Kolivad (12/10/2008) Using the same DB... I mean without using backup ... we cant restore a stored procedure to the previous version.
As Gail Shaw mentioned if you have backup of the database where you have the previous version of the procedure you can restore using the backup.
you can generate the script the sp for previous ver. if it is not encrypted.
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 4:15 PM
Points: 37,651,
Visits: 29,903
|
|
Kishore.P (12/10/2008) [quote]you can generate the script the sp for previous ver. if it is not encrypted.
How, if the proc has been written over?
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter We stand on the bridge and no one may pass
|
|
|
|
|
SSChampion
        
Group: General Forum Members
Last Login: Today @ 12:19 PM
Points: 13,371,
Visits: 25,144
|
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Tuesday, May 07, 2013 7:07 AM
Points: 1,146,
Visits: 1,847
|
|
Grant Fritchey (12/10/2008) Pull a previous copy out of source control...
If you don't have your code under source control, here's the wake-up call to get it there.
You can't retrieve a previous copy from the current database. It's gone.
I second that!
(PHB) I think we should build an SQL database. (Dilbert) What color do you want that database? (PHB) I think mauve has the most RAM.
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Monday, May 13, 2013 8:24 AM
Points: 3,280,
Visits: 6,619
|
|
Kishore.P (12/10/2008)
Gauthama Kolivad (12/10/2008) Using the same DB... I mean without using backup ... we cant restore a stored procedure to the previous version.
As Gail Shaw mentioned if you have backup of the database where you have the previous version of the procedure you can restore using the backup.you can generate the script the sp for previous ver. if it is not encrypted. I would really like to know how this can be done.... Never heard of any method to do this.
-Roy
|
|
|
|
|
SSChampion
        
Group: General Forum Members
Last Login: Today @ 12:19 PM
Points: 13,371,
Visits: 25,144
|
|
Roy Ernest (12/11/2008)
Kishore.P (12/10/2008)
Gauthama Kolivad (12/10/2008) Using the same DB... I mean without using backup ... we cant restore a stored procedure to the previous version.
As Gail Shaw mentioned if you have backup of the database where you have the previous version of the procedure you can restore using the backup.you can generate the script the sp for previous ver. if it is not encrypted. I would really like to know how this can be done.... Never heard of any method to do this.
I think it was a misunderstanding. I've never heard of a mechanism for doing this either.
---------------------------------------------------- "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt The Scary DBA Author of: SQL Server 2012 Query Performance Tuning SQL Server 2008 Query Performance Tuning Distilled and SQL Server Execution Plans
Product Evangelist for Red Gate Software
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Tuesday, May 14, 2013 4:08 AM
Points: 113,
Visits: 624
|
|
I think there is a miscommunication..... with the message I have posted.
As Gail Shaw mentioned if you have backup of the database where you have the previous version of the procedure you can restore using the backup.
I mean to say if we have backup ... where we have older version of the procedure.... we can restore to the previous version.. by restoring the database backup... and taking old sp from that backup.
I think it was a misunderstanding. I've never heard of a mechanism for doing this either.
Yes there is not mechanism for restoring to the previous version with any other method.
|
|
|
|