dbTalk Databases Forums  

Help Please - Backup FileGroup and Restore

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


Discuss Help Please - Backup FileGroup and Restore in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
csomberg@dwr.com
 
Posts: n/a

Default Help Please - Backup FileGroup and Restore - 05-05-2005 , 08:20 AM






SQL 2000

I have server1 with two filegroups.
I want to backup FileGroup Primary on Server1 and Primary has a
physical file called MyData.mdf.

I have server2 with the same database and two filegroups BUT the
Physical names are different. The Primary FileGroup is in physical file
OurData.mdf

How can I get server1->MyData.mdf to Server2->OurData.mdf

Thanks !


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

Default Re: Help Please - Backup FileGroup and Restore - 05-05-2005 , 05:09 PM






(csomberg (AT) dwr (DOT) com) writes:
Quote:
I have server1 with two filegroups.
I want to backup FileGroup Primary on Server1 and Primary has a
physical file called MyData.mdf.

I have server2 with the same database and two filegroups BUT the
Physical names are different. The Primary FileGroup is in physical file
OurData.mdf

How can I get server1->MyData.mdf to Server2->OurData.mdf
First backup it, then restore with:

RESTORE DATABASE db FROM disk=<path-to-backupfile>
WITH MOVE 'db_data' TO 'OurData.mdf',
MOVE 'db_log' TO 'OurData.log,
REPLACE

dn_data and db_log are the name of the logical files, you find these
with sp_helpdb on the source database or RESTORE DATABASE FILELIST_ONLY.
In the TO part, you need to specify complete path.

Also see the topic on RESTORE in Books Online.


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

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp


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.