(cs******@dwr.com) writes:
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,
es****@sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp