SQL Clone
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
SSC Rookie
SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)

Group: General Forum Members
Points: 30 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 Guru
SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)

Group: General Forum Members
Points: 86144 Visits: 45229
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 Veteran
SSC Veteran (267 reputation)SSC Veteran (267 reputation)SSC Veteran (267 reputation)SSC Veteran (267 reputation)SSC Veteran (267 reputation)SSC Veteran (267 reputation)SSC Veteran (267 reputation)SSC Veteran (267 reputation)

Group: General Forum Members
Points: 267 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
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1697 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 Guru
SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)

Group: General Forum Members
Points: 86144 Visits: 45229
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
SSC-Dedicated
SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)

Group: General Forum Members
Points: 39039 Visits: 32616
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
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1734 Visits: 2054
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
Hall of Fame
Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)

Group: General Forum Members
Points: 3706 Visits: 6869
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
SSC-Dedicated
SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)

Group: General Forum Members
Points: 39039 Visits: 32616
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 Veteran
SSC Veteran (267 reputation)SSC Veteran (267 reputation)SSC Veteran (267 reputation)SSC Veteran (267 reputation)SSC Veteran (267 reputation)SSC Veteran (267 reputation)SSC Veteran (267 reputation)SSC Veteran (267 reputation)

Group: General Forum Members
Points: 267 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