December 9, 2008 at 10:47 pm
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
December 10, 2008 at 12:22 am
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
December 10, 2008 at 1:04 am
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.
December 10, 2008 at 1:46 am
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.
December 10, 2008 at 1:59 am
Kishore.P (12/10/2008)
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
December 10, 2008 at 7:42 am
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
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
December 11, 2008 at 7:33 am
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!
December 11, 2008 at 8:23 am
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
December 11, 2008 at 9:17 am
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
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
December 11, 2008 at 11:05 pm
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.
December 11, 2008 at 11:05 pm
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 no mechanism for restoring to the previous version with any other method.
March 27, 2013 at 8:26 am
You can restore it from a database backup even without restoring the backup. You need a tool for comparing and synchronizing object schemas (such as SQL Diff). Set the database backup as a source, the live database as a destination, filter only the stored procedure you want to restore
March 27, 2013 at 8:43 am
Please note: 4 year old thread
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
Viewing 13 posts - 1 through 12 (of 12 total)
You must be logged in to reply to this topic. Login to reply