Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


retrieve the previous version of a stored procedure


retrieve the previous version of a stored procedure

Author
Message
Pooja_prasad
Pooja_prasad
Grasshopper
Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)

Group: General Forum Members
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
GilaMonster
GilaMonster
SSC-Forever
SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)

Group: General Forum Members
Points: 47213 Visits: 44369
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, MVP, M.Sc (Comp Sci)
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


brainy
brainy
SSC-Enthusiastic
SSC-Enthusiastic (123 reputation)SSC-Enthusiastic (123 reputation)SSC-Enthusiastic (123 reputation)SSC-Enthusiastic (123 reputation)SSC-Enthusiastic (123 reputation)SSC-Enthusiastic (123 reputation)SSC-Enthusiastic (123 reputation)SSC-Enthusiastic (123 reputation)

Group: General Forum Members
Points: 123 Visits: 649
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.
Kishore.P
Kishore.P
Ten Centuries
Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)

Group: General Forum Members
Points: 1395 Visits: 619
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.



GilaMonster
GilaMonster
SSC-Forever
SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)

Group: General Forum Members
Points: 47213 Visits: 44369
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, MVP, M.Sc (Comp Sci)
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


Grant Fritchey
Grant Fritchey
SSCoach
SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)

Group: General Forum Members
Points: 17580 Visits: 32260
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
Mauve
Mauve
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1246 Visits: 2049
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.
Roy Ernest
Roy Ernest
SSCrazy
SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)

Group: General Forum Members
Points: 2494 Visits: 6852
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
Grant Fritchey
Grant Fritchey
SSCoach
SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)

Group: General Forum Members
Points: 17580 Visits: 32260
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
brainy
brainy
SSC-Enthusiastic
SSC-Enthusiastic (123 reputation)SSC-Enthusiastic (123 reputation)SSC-Enthusiastic (123 reputation)SSC-Enthusiastic (123 reputation)SSC-Enthusiastic (123 reputation)SSC-Enthusiastic (123 reputation)SSC-Enthusiastic (123 reputation)SSC-Enthusiastic (123 reputation)

Group: General Forum Members
Points: 123 Visits: 649
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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search