Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2008
»
SQL Server 2008 - General
»
Restore database
Restore database
Rate Topic
Display Mode
Topic Options
Author
Message
kapil_kk
kapil_kk
Posted Thursday, October 18, 2012 12:23 AM
Ten Centuries
Group: General Forum Members
Last Login: 2 days ago @ 11:16 PM
Points: 1,061,
Visits: 1,151
I am working a database and created some stored procedures in that about 10 days before..somehow today I restore it with current database which dont have those SP...
Is there any way to restore the database in which I created SP 10 days before...
plzz suggest
Post #1374160
GilaMonster
GilaMonster
Posted Thursday, October 18, 2012 2:05 AM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 6:25 AM
Points: 37,679,
Visits: 29,934
Get a backup that does have those procedures in and restore it as a new DB. Copy the procs 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 #1374188
kapil_kk
kapil_kk
Posted Thursday, October 18, 2012 4:08 AM
Ten Centuries
Group: General Forum Members
Last Login: 2 days ago @ 11:16 PM
Points: 1,061,
Visits: 1,151
But I dont know that if the backup of that database is exist on sytem or not as I didnt take any backup of that...
Post #1374242
GilaMonster
GilaMonster
Posted Thursday, October 18, 2012 4:12 AM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 6:25 AM
Points: 37,679,
Visits: 29,934
Then you'll have to rewrite them. When you restored a DB over the one with the procs, those procs were lost.
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 #1374244
kapil_kk
kapil_kk
Posted Thursday, October 18, 2012 4:14 AM
Ten Centuries
Group: General Forum Members
Last Login: 2 days ago @ 11:16 PM
Points: 1,061,
Visits: 1,151
ohhh....
Means if I delete any database then we cant restore it back anyhow?
Is there any way using logs file...
Post #1374245
GilaMonster
GilaMonster
Posted Thursday, October 18, 2012 4:18 AM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 6:25 AM
Points: 37,679,
Visits: 29,934
Errr.. backups. That's what they are there for.
If you restored over or deleted a backup, the transaction logs would be gone too, not that they are a way of recovering an entire database without backups anyway.
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 #1374250
kapil_kk
kapil_kk
Posted Thursday, October 18, 2012 4:29 AM
Ten Centuries
Group: General Forum Members
Last Login: 2 days ago @ 11:16 PM
Points: 1,061,
Visits: 1,151
thanks for the information Gila
Post #1374258
Grant Fritchey
Grant Fritchey
Posted Thursday, October 18, 2012 7:26 AM
SSChampion
Group: General Forum Members
Last Login: Today @ 3:51 AM
Points: 13,372,
Visits: 25,154
Also, going forward, treat your database code the same way as developers treat application code. Put all your stored procedures (I'd say all your database objects) into source control. That way you keep a copy separate from the database and you have versions and tracking and all the good things that source control gives you.
----------------------------------------------------
"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 #1374344
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.