dbTalk Databases Forums  

Viewing backup in a different location

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss Viewing backup in a different location in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Steve F
 
Posts: n/a

Default Viewing backup in a different location - 06-21-2007 , 09:54 AM






i have a copy of a SQL Server 2000 database on an external hardrive.

I have SQL Enterprise Manager 2005 on my laptop and was wondering if
it is possible to view the backup on my laptop when external hard
drive is plugged in.

What other software/tools/procedures do i need to do to make the
backup "viewable"

Regards

Steve F


Reply With Quote
  #2  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: Viewing backup in a different location - 06-21-2007 , 05:02 PM






Steve F (scfisher (AT) gmail (DOT) com) writes:
Quote:
i have a copy of a SQL Server 2000 database on an external hardrive.

I have SQL Enterprise Manager 2005 on my laptop and was wondering if
it is possible to view the backup on my laptop when external hard
drive is plugged in.

What other software/tools/procedures do i need to do to make the
backup "viewable"
It is not fully clear to me if you have a backup of the database,
or a copy of the MDF and LDF files. But assuming you have a backup,
first to:

RESTORE FILELISTONLY FROM DISK ='X:\...\backup.bak'

where X is the drive-letter for your removable disk. Pay attention to
the column logical name. Then restore the database with this command:

RESTORE DATABASE db FROM DISK='X:\...\backup.bak' WITH
MOVE 'LogicalName1' TO
'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\db.mdf',
MOVE 'LogicalName2' TO
'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\db.ldf',
REPLACE

You could choose other physical locations for the database if you wish.

You could also use the GUI in Management Studio to perform the RESTORE,
but I don't use that myself.

--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.