Monday, March 12, 2012

How Can We Restore Database To New Database with Applying Diff. and Log Backup?

Hi,
I have trouble restoring database from backup device set. The device is vali
d. I want to restore the database to a new database. This step is succeed. T
he problem is that I only restore for full backup only, but I haven't applie
d differential and
transactional backup. I also want this set of backup move to new database. I
f I choose diff backup in restore dialog, then its only give one choice. The
error message is I have to restore with norevocery or stanby opotion. I've
already try from T-SQL, but
its still fail. My questions are:
1. How do I restore backup device to new database with applying diff and log
backup?
2. Can I restore the diif and log backup to new location? (with full backup
first)
Thanks.
Rahmadi AjiWhen you restore a database and want to restore transaction logs right click
on the database in question and in the options tab choose Leave database no
noperational but able to restore additional transaction logs. You can then a
pply transaction logs.
If you want to restore a backup to a different database than the original cr
eate the new database and then choose restore with the 'Force restore over e
xisting database' option ticked.|||>>If you want to restore a backup to a different database than the original create the new
database and then choose
In this case, I want to restore database to a new database in the same origi
nal database. And I already have tried all of
the alternatives including 'Force restore.... Because I want to restore it
on different physical name. None are succeceed.
If I use same physical name it will overwrite the original.|||<< In this case, I want to restore database to a new database in the same or
iginal database.>>
Above seems like a contradiction to me. If you post the RESTORE commands you
used for all RESTORE commands
(RESTORE DATABASE ..., REDORE LOG ...) it is much easier to spot what might
be the problem.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Rahmadi Aji" <anonymous@.discussions.microsoft.com> wrote in message
news:B513D972-EDA8-4823-AC58-ED253E06AC0B@.microsoft.com...
choose
> In this case, I want to restore database to a new database in the same original da
tabase. And I already have
tried all of
> the alternatives including 'Force restore.... Because I want to restore it on dif
ferent physical name. None
are succeceed.
> If I use same physical name it will overwrite the original.|||If you want to restore a Database (from a backup) to a new Database, the 'lo
gical' data and transaction log filenames must be the same and the file loca
tions can be different.
This is how I would do it:
If you want to restore just a full backup to a new database, create the new
Database with the SAME logical "Filename" for the data and transaction logs
as the original but a different "location". If using EM, right click on
the new database and choose
all tasks then restore database. Choose from device, add device and brows
e out to find the .bak file you want to restore. Back on the options tab, C
hoose the 'force restore over existing' and specify your new file locations
for both the data and tra
nsaction logs under 'move to physical file name' - leave the logical filena
mes as is - those should be the same as your original database. If you w
ant just to restore a full backup, leave the 'leave database operational' bo
x checked. If you also wan
t to restore transaction log backups, choose one of the other options. if y
ou are restoring more than one transaction log backup, on the LAST transacti
on log restore you should leave the 'leave database operational' box checked
.
Knowledge base article 31456 also explains how to do this using query analyz
er as well.|||I mean in the same machine(server). I want to restore to a new database.
-- Tibor Karaszi wrote: --
<< In this case, I want to restore database to a new database in the same or
iginal database.>>
Above seems like a contradiction to me. If you post the RESTORE commands you
used for all RESTORE commands
(RESTORE DATABASE ..., REDORE LOG ...) it is much easier to spot what might
be the problem.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Rahmadi Aji" <anonymous@.discussions.microsoft.com> wrote in message
news:B513D972-EDA8-4823-AC58-ED253E06AC0B@.microsoft.com...
choose[vbcol=seagreen]
tried all of[vbcol=seagreen]
> the alternatives including 'Force restore.... Because I want to restore it on dif
ferent physical name. None
are succeceed.
> If I use same physical name it will overwrite the original.|||You're right about that, but I want to restore with differential and log bac
kup. I have tried you're advice, it didn't work. I restore full backup ('lea
ve database nonoperational') and then I add differential backup ('leave data
base operational'). When I
add diff. backup I use 'force restore over existing' and 'move to physical
file name' with same logical name, It doesn't work.
-- jpotucek wrote: --
If you want to restore a Database (from a backup) to a new Database, the 'lo
gical' data and transaction log filenames must be the same and the file loca
tions can be different.
This is how I would do it:
If you want to restore just a full backup to a new database, create the new
Database with the SAME logical "Filename" for the data and transaction logs
as the original but a different "location". If using EM, right click on
the new database and c
hoose all tasks then restore database. Choose from device, add device and
browse out to find the .bak file you want to restore. Back on the options
tab, Choose the 'force restore over existing' and specify your new file loc
ations for both the data an
d transaction logs under 'move to physical file name' - leave the logical f
ilenames as is - those should be the same as your original database. If
you want just to restore a full backup, leave the 'leave database operationa
l' box checked. If you als
o want to restore transaction log backups, choose one of the other options.
if you are restoring more than one transaction log backup, on the LAST tran
saction log restore you should leave the 'leave database operational' box ch
ecked.
Knowledge base article 31456 also explains how to do this using query analyz
er as well.|||Again, If you post the RESTORE commands you used for all RESTORE commands (
RESTORE DATABASE ..., RESTORE LOG
...) it is much easier to spot what might be the problem.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Rahmadi Aji" <anonymous@.discussions.microsoft.com> wrote in message
news:6EE5847B-C35E-42E4-9AD4-93C799F70631@.microsoft.com...
> I mean in the same machine(server). I want to restore to a new database.
> -- Tibor Karaszi wrote: --
> << In this case, I want to restore database to a new database in the
same original database.>>
> Above seems like a contradiction to me. If you post the RESTORE commands you
used for all RESTORE
commands
> (RESTORE DATABASE ..., REDORE LOG ...) it is much easier to spot what
might be the problem.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
>
> "Rahmadi Aji" <anonymous@.discussions.microsoft.com> wrote in message
> news:B513D972-EDA8-4823-AC58-ED253E06AC0B@.microsoft.com...
and then[vbcol=seagreen]
> choose
already have[vbcol=seagreen]
> tried all of
name. None[vbcol=seagreen]
> are succeceed.
>
>

No comments:

Post a Comment