470,591 Members | 1,869 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,591 developers. It's quick & easy.

Help Please - Backup FileGroup and Restore

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
1 1516
(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
Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by newbiegca_sqlsever2000 | last post: by
2 posts views Thread by si.downes | last post: by
1 post views Thread by G. Dean Blake | last post: by
reply views Thread by raj.raghavan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.