364,111 Members | 2051 Browsing Online
Community for Developers & IT Professionals
Bytes IT Community

Help Please - Backup FileGroup and Restore

csomberg@dwr.com
P: n/a
csomberg@dwr.com
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 !

Jul 23 '05 #1
Share this Question
Share on Google+
1 Reply


Erland Sommarskog
P: n/a
Erland Sommarskog
(csomberg@dwr.com) writes:[color=blue]
> 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[/color]

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@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #2

Post your reply

Help answer this question



Didn't find the answer to your Microsoft SQL Server question?

You can also browse similar questions: Microsoft SQL Server