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 @ 9:22 AM
Points: 40,632, Visits: 37,094
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, November 14, 2014 12:35 AM
Points: 115, Visits: 647
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: Friday, November 14, 2014 8:57 AM
Points: 1,391, Visits: 609
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 @ 9:22 AM
Points: 40,632, Visits: 37,094
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


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 3:26 AM
Points: 14,205, Visits: 28,536
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 Query Performance Tuning
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: Thursday, December 18, 2014 2:25 PM
Points: 1,187, Visits: 1,987
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


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: 2 days ago @ 5:36 AM
Points: 2,372, Visits: 6,768
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


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 3:26 AM
Points: 14,205, Visits: 28,536
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 Query Performance Tuning
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, November 14, 2014 12:35 AM
Points: 115, Visits: 647
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