SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


restore database


restore database

Author
Message
HBK_4700
HBK_4700
Right there with Babe
Right there with Babe (751 reputation)Right there with Babe (751 reputation)Right there with Babe (751 reputation)Right there with Babe (751 reputation)Right there with Babe (751 reputation)Right there with Babe (751 reputation)Right there with Babe (751 reputation)Right there with Babe (751 reputation)

Group: General Forum Members
Points: 751 Visits: 1834
I am trying to restore a database thru Management studio

restored database full backup with no recovery
Now trying to restore diff backup with recovery, throwing below error

The backup set holds a backup of a database other than the existing 'test' database.


Can anybody provide the tsql command to restore

Restore full backup with no recovery
restore diff backup with no recovery
restore diff 2 backup with recovery
GilaMonster
GilaMonster
SSC Guru
SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)

Group: General Forum Members
Points: 88224 Visits: 45277
Are you sure the diff you're trying to restore belongs to that database? The error indicates that it doesn't

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


homebrew01
homebrew01
SSCarpal Tunnel
SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)

Group: General Forum Members
Points: 4905 Visits: 9108
laddu4700 (1/6/2010)

Restore full backup with no recovery
restore diff backup with no recovery
restore diff 2 backup with recovery


You only need to restore the most recent diff, then all the transaction logs more recent than the diff.



SQLRNNR
SQLRNNR
SSC-Dedicated
SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)

Group: General Forum Members
Points: 32697 Visits: 18559
homebrew01 (1/6/2010)
laddu4700 (1/6/2010)

Restore full backup with no recovery
restore diff backup with no recovery
restore diff 2 backup with recovery


You only need to restore the most recent diff, then all the transaction logs more recent than the diff.


Yes - as homebrew said. Eliminate the middle diff backup and then add your tran logs more recent than the last diff.



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw

HBK_4700
HBK_4700
Right there with Babe
Right there with Babe (751 reputation)Right there with Babe (751 reputation)Right there with Babe (751 reputation)Right there with Babe (751 reputation)Right there with Babe (751 reputation)Right there with Babe (751 reputation)Right there with Babe (751 reputation)Right there with Babe (751 reputation)

Group: General Forum Members
Points: 751 Visits: 1834
Thanks to all, i was selecting wrong back up file

So Now i want to verity the updated data

I have one full backup file 12/31/2009 12:20AM
Diff backup file 12/31/2009 06:35 AM
TLOG BACKUP 180 files between 6:35 am to 12:35pm

I want to restore each tlog with recovery and check the data..every time do I need to delete database and restore with tlog with recovery? or any other way to do it
GilaMonster
GilaMonster
SSC Guru
SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)

Group: General Forum Members
Points: 88224 Visits: 45277
Restore it with Standby. Otherwise you'd have to drop the database and start from scratch after each log restore.

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


VastSQL
VastSQL
SSCarpal Tunnel
SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)

Group: General Forum Members
Points: 4461 Visits: 5157
Hi Gail,

How can we make a database in standby mode if we are specifying the WITH NORECOVERY option?

Can you please let me know how to restore the database in standby mode?What about the subsequent diff backup and log backup restoration?


TIA
GilaMonster
GilaMonster
SSC Guru
SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)

Group: General Forum Members
Points: 88224 Visits: 45277
Ratheesh.K.Nair (1/6/2010)
How can we make a database in standby mode if we are specifying the WITH NORECOVERY option?

You can't. If you want the database in Standby, you use WITH STANDBY instead of WITH NORECOVERY

Can you please let me know how to restore the database in standby mode?What about the subsequent diff backup and log backup restoration?


May I suggest a read of Books Online, specifically the sections on restoring a log.

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


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