Home > Archive > MS SQL Server > February 2006 > Restore backup file









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Restore backup file
VBB

2006-02-06, 7:23 am

I have a back up file of a database which is residing in a different server.
I need to restore the database with the .bak file which is available with
me. How should I proceed to set up this.
Sreejith G

2006-02-06, 7:23 am

RESTORE FILELISTONLY
FROM DISK = 'F:\backupfilename.bak'

This will provide you the logical filename of backup .mdf and .ldf file.

RESTORE DATABASE DB_NAME_TO_BE_RESTOR
ED
FROM DISK = 'F:\backupfilename.bak'
WITH MOVE 'Logical_Name_Data' TO 'F:\MSSQL\DATA\Physi
cal_Name_Data.mdf',
MOVE 'Logical_Data_Log' TO 'E:\MSSQL\LOG\Physic
al_Name_Log.ldf',
STATS = 1, REPLACE
GO

Please revert if you have any queries.

Thanks,
Sree

"VBB" wrote:

> I have a back up file of a database which is residing in a different server.
> I need to restore the database with the .bak file which is available with
> me. How should I proceed to set up this.

VBB

2006-02-06, 7:23 am

I executed the following statements
********************
*****************
USE master
GO
RESTORE FILELISTONLY
FROM DISK = 'C:\Bkp\Xchange.BAK'
RESTORE DATABASE XChange_DB
FROM DISK = 'C:\Bkp\Xchange.BAK'
WITH MOVE 'L_XChange_Data' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL\Data\P_
XChange.mdf',
MOVE 'L_XChange_Log' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL\Data\P_
XChange.ldf',
STATS = 1, REPLACE
GO

********************
********************
***********
I got the following error


(2 row(s) affected)

Server: Msg 3234, Level 16, State 2, Line 3
Logical file 'L_XChange_Data' is not part of database 'XChange_DB'. Use
RESTORE FILELISTONLY to list the logical file names.
Server: Msg 3013, Level 16, State 1, Line 3
RESTORE DATABASE is terminating abnormally.

Please let me know what has went wrong.

"Sreejith G" wrote:
[color=darkred]
> RESTORE FILELISTONLY
> FROM DISK = 'F:\backupfilename.bak'
>
> This will provide you the logical filename of backup .mdf and .ldf file.
>
> RESTORE DATABASE DB_NAME_TO_BE_RESTOR
ED
> FROM DISK = 'F:\backupfilename.bak'
> WITH MOVE 'Logical_Name_Data' TO 'F:\MSSQL\DATA\Physi
cal_Name_Data.mdf',
> MOVE 'Logical_Data_Log' TO 'E:\MSSQL\LOG\Physic
al_Name_Log.ldf',
> STATS = 1, REPLACE
> GO
>
> Please revert if you have any queries.
>
> Thanks,
> Sree
>
> "VBB" wrote:
>
Sreejith G

2006-02-06, 7:23 am

You need to provide the logical filename that you got from the output of
"RESTORE FILELISTONLY" +>

RESTORE FILELISTONLY
FROM DISK = 'F:\backupfilename.bak'

as input of

RESTORE DATABASE DB_NAME_TO_BE_RESTOR
ED
FROM DISK = 'F:\backupfilename.bak'
WITH MOVE 'Logical_Name_Data' TO 'F:\MSSQL\DATA\Physi
cal_Name_Data.mdf',
MOVE 'Logical_Data_Log' TO 'E:\MSSQL\LOG\Physic
al_Name_Log.ldf',
STATS = 1, REPLACE
GO

Its not like you have to run that in one shot.

Thanks,
Sree

"VBB" wrote:
[color=darkred]
> I executed the following statements
> ********************
*****************
> USE master
> GO
> RESTORE FILELISTONLY
> FROM DISK = 'C:\Bkp\Xchange.BAK'
> RESTORE DATABASE XChange_DB
> FROM DISK = 'C:\Bkp\Xchange.BAK'
> WITH MOVE 'L_XChange_Data' TO 'C:\Program Files\Microsoft SQL
> Server\MSSQL\Data\P_
XChange.mdf',
> MOVE 'L_XChange_Log' TO 'C:\Program Files\Microsoft SQL
> Server\MSSQL\Data\P_
XChange.ldf',
> STATS = 1, REPLACE
> GO
>
> ********************
********************
***********
> I got the following error
>
>
> (2 row(s) affected)
>
> Server: Msg 3234, Level 16, State 2, Line 3
> Logical file 'L_XChange_Data' is not part of database 'XChange_DB'. Use
> RESTORE FILELISTONLY to list the logical file names.
> Server: Msg 3013, Level 16, State 1, Line 3
> RESTORE DATABASE is terminating abnormally.
>
> Please let me know what has went wrong.
>
> "Sreejith G" wrote:
>
VBB

2006-02-06, 7:23 am

IT WORKED.

Thank you very much for your help.

"Sreejith G" wrote:
[color=darkred]
> You need to provide the logical filename that you got from the output of
> "RESTORE FILELISTONLY" +>
>
> RESTORE FILELISTONLY
> FROM DISK = 'F:\backupfilename.bak'
>
> as input of
>
> RESTORE DATABASE DB_NAME_TO_BE_RESTOR
ED
> FROM DISK = 'F:\backupfilename.bak'
> WITH MOVE 'Logical_Name_Data' TO 'F:\MSSQL\DATA\Physi
cal_Name_Data.mdf',
> MOVE 'Logical_Data_Log' TO 'E:\MSSQL\LOG\Physic
al_Name_Log.ldf',
> STATS = 1, REPLACE
> GO
>
> Its not like you have to run that in one shot.
>
> Thanks,
> Sree
>
> "VBB" wrote:
>
VBB

2006-02-06, 7:23 am

Can you please provide me your email id. So that I can contact you if I have
any issues with SQL Server.

"Sreejith G" wrote:
[color=darkred]
> You need to provide the logical filename that you got from the output of
> "RESTORE FILELISTONLY" +>
>
> RESTORE FILELISTONLY
> FROM DISK = 'F:\backupfilename.bak'
>
> as input of
>
> RESTORE DATABASE DB_NAME_TO_BE_RESTOR
ED
> FROM DISK = 'F:\backupfilename.bak'
> WITH MOVE 'Logical_Name_Data' TO 'F:\MSSQL\DATA\Physi
cal_Name_Data.mdf',
> MOVE 'Logical_Data_Log' TO 'E:\MSSQL\LOG\Physic
al_Name_Log.ldf',
> STATS = 1, REPLACE
> GO
>
> Its not like you have to run that in one shot.
>
> Thanks,
> Sree
>
> "VBB" wrote:
>
Sreejith G

2006-02-06, 7:23 am

sreejith. gopalakrishnan@ustri
.com

Always welcome!!!

Thanks
Sree

"VBB" wrote:
[color=darkred]
> Can you please provide me your email id. So that I can contact you if I have
> any issues with SQL Server.
>
> "Sreejith G" wrote:
>
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com