Thursday, March 8, 2012

Database restore problem

A customer's Windows 2000 server would not reboot. They
ran a repair, but the drive letters on the server moved
ahead two spots. The drive letter D is now drive F.
I attempted a restore of a database through Enterprise
Manager, but I get the following error message :
"Device activation error: the physical file name d:\sql
db\otg.mdf: may be incorrect. File 'otg data' cannot be
restored to d:\sql db\otg.mdf'. Use with move to identify
a valid location for the file. Device activation error.
The physical file name 'D:\sql db\otglog.ldf may be
incorrect. File 'otglog' cannot be restored to 'd:\sql
db\otglog.ldf.' Use with move to identify a valid location
for the file. Restore db is terminating abnormally."
The original database files were located on C. A backup of
the database was saved to D.
What can I do to restore this database? Can anyone suggest
a query that restores the database to its previous state?
Thanks for your help.Hello Craig !
If you restore in EM you should change the path where you want to place the
new datafiles from the backup.
Please note, that the directories will NOT be created by EM, they must be
created before restoring the database.
HTH, Jens Süßmeyer.|||Try this:
RESTORE DATABASE otg
FROM DISK= 'c:\wherever the .bak file is'
WITH RECOVERY,replace,
MOVE 'otg_data' TO 'd:\sql_db\otg.mdf',
MOVE 'otgLog' TO 'd:\sql_db\otglog.ldf.'
Make sure you have enough permissions, with OTG imaging database you can use
the sysop user ;)
HTH
--
Ray Higdon MCSE, MCDBA, CCNA
--
"Craig Kornacki" <ckornack@.localnet.com> wrote in message
news:034701c36f5b$2e13c320$a301280a@.phx.gbl...
> A customer's Windows 2000 server would not reboot. They
> ran a repair, but the drive letters on the server moved
> ahead two spots. The drive letter D is now drive F.
> I attempted a restore of a database through Enterprise
> Manager, but I get the following error message :
> "Device activation error: the physical file name d:\sql
> db\otg.mdf: may be incorrect. File 'otg data' cannot be
> restored to d:\sql db\otg.mdf'. Use with move to identify
> a valid location for the file. Device activation error.
> The physical file name 'D:\sql db\otglog.ldf may be
> incorrect. File 'otglog' cannot be restored to 'd:\sql
> db\otglog.ldf.' Use with move to identify a valid location
> for the file. Restore db is terminating abnormally."
> The original database files were located on C. A backup of
> the database was saved to D.
> What can I do to restore this database? Can anyone suggest
> a query that restores the database to its previous state?
> Thanks for your help.|||I know it's late, but what I would do is change the Drive letter to the
original drive letter using windows disk manager... This will likely prevent
other mapping kinds of errors from other applications as well.
"Craig Kornacki" <ckornack@.localnet.com> wrote in message
news:034701c36f5b$2e13c320$a301280a@.phx.gbl...
> A customer's Windows 2000 server would not reboot. They
> ran a repair, but the drive letters on the server moved
> ahead two spots. The drive letter D is now drive F.
> I attempted a restore of a database through Enterprise
> Manager, but I get the following error message :
> "Device activation error: the physical file name d:\sql
> db\otg.mdf: may be incorrect. File 'otg data' cannot be
> restored to d:\sql db\otg.mdf'. Use with move to identify
> a valid location for the file. Device activation error.
> The physical file name 'D:\sql db\otglog.ldf may be
> incorrect. File 'otglog' cannot be restored to 'd:\sql
> db\otglog.ldf.' Use with move to identify a valid location
> for the file. Restore db is terminating abnormally."
> The original database files were located on C. A backup of
> the database was saved to D.
> What can I do to restore this database? Can anyone suggest
> a query that restores the database to its previous state?
> Thanks for your help.|||Will this query work even if there is no D drive on the
server?
>--Original Message--
>Try this:
>RESTORE DATABASE otg
>FROM DISK= 'c:\wherever the .bak file is'
> WITH RECOVERY,replace,
> MOVE 'otg_data' TO 'd:\sql_db\otg.mdf',
> MOVE 'otgLog' TO 'd:\sql_db\otglog.ldf.'
>Make sure you have enough permissions, with OTG imaging
database you can use
>the sysop user ;)
>HTH
>--
>Ray Higdon MCSE, MCDBA, CCNA
>--
>"Craig Kornacki" <ckornack@.localnet.com> wrote in message
>news:034701c36f5b$2e13c320$a301280a@.phx.gbl...
>> A customer's Windows 2000 server would not reboot.
They
>> ran a repair, but the drive letters on the server moved
>> ahead two spots. The drive letter D is now drive F.
>> I attempted a restore of a database through Enterprise
>> Manager, but I get the following error message :
>> "Device activation error: the physical file name
d:\sql
>> db\otg.mdf: may be incorrect. File 'otg data' cannot
be
>> restored to d:\sql db\otg.mdf'. Use with move to
identify
>> a valid location for the file. Device activation
error.
>> The physical file name 'D:\sql db\otglog.ldf may be
>> incorrect. File 'otglog' cannot be restored to 'd:\sql
>> db\otglog.ldf.' Use with move to identify a valid
location
>> for the file. Restore db is terminating abnormally."
>> The original database files were located on C. A
backup of
>> the database was saved to D.
>> What can I do to restore this database? Can anyone
suggest
>> a query that restores the database to its previous
state?
>> Thanks for your help.
>
>.
>

No comments:

Post a Comment