Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

retrieve the previous version of a stored procedure Expand / Collapse
Author
Message
Posted Tuesday, December 9, 2008 10:47 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

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
Post #616678
Posted Wednesday, December 10, 2008 12:22 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 3:25 PM
Points: 43,008, Visits: 36,164
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

Post #616709
Posted Wednesday, December 10, 2008 1:04 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, July 4, 2014 7:44 AM
Points: 115, Visits: 646
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.
Post #616729
Posted Wednesday, December 10, 2008 1:46 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, March 13, 2014 5:49 AM
Points: 1,391, Visits: 608
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.



Post #616747
Posted Wednesday, December 10, 2008 1:59 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 3:25 PM
Points: 43,008, Visits: 36,164
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

Post #616758
Posted Wednesday, December 10, 2008 7:42 AM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Today @ 1:03 PM
Points: 15,729, Visits: 28,132
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.


----------------------------------------------------
"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
Post #617026
Posted Thursday, December 11, 2008 7:33 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 7:27 AM
Points: 1,186, Visits: 1,973
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.
Post #617897
Posted Thursday, December 11, 2008 8:23 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Today @ 8:23 AM
Points: 3,315, Visits: 6,723
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
Post #617958
Posted Thursday, December 11, 2008 9:17 AM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Today @ 1:03 PM
Points: 15,729, Visits: 28,132
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
Post #618030
Posted Thursday, December 11, 2008 11:05 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, July 4, 2014 7:44 AM
Points: 115, Visits: 646
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.
Post #618393
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse