473,760 Members | 9,717 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1664
(cs******@dwr.c om) 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****@sommarsk og.se

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

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
4711
by: Rajesh Garg | last post by:
I have actually extended my request I have a scenario like this....... update esan set tes_address_city = 'TEST1' --at some time update esan set tes_address_city = 'TEST12' --at some time update esan set tes_address_city = 'TEST123' --at some time backup database TESTWMS to disk = 'D:\temp\RecoveryTest\TESTWMS.db' backup log TESTWMS to disk = 'D:\temp\RecoveryTest\TESTWMS01.log'
0
2084
by: xo55ox | last post by:
Hi, I have been trying to set up an automated restore process from prod to backup server. First, I schedule the full database backup nightly, transfer the backup file and restore it to the database on the backup server. Meanwhile, I leave the database ready to accept transaction log from the transaction log backup at noon daily. And I had used different restore options to test out the transaction that was being applied. And I couldn't...
0
1549
by: newbiegca_sqlsever2000 | last post by:
SQLServer 2000 Backup question. Let us say we have a database where data is stored in filegroup F1 and Filegroup F2 Backup of this is done on alternate days Day 1 - Full backup of file group F1 at 10 pm Day 2 - Full backup of file group F2 at 10 pm Day 3 - Full backup of file group F1 at 10 pm
2
1994
by: si.downes | last post by:
Using SQL Server 2000 SP3 I'm developing a data warehouse where data will be archived off to a filegroup, this filegroup backed up and the tables in this filegroup truncated to free up space on the server. So using Enterprise Manager I've copied data to the filegroup tables, backed up the file group, truncated the tables, but when I have restored the file group the database is stuck in a state of '(loading...)' and I can't get it to...
1
1533
by: G. Dean Blake | last post by:
How can I backup and restore a SQLServer DB from a .net VB program? Thanks, G
1
1928
by: RSH | last post by:
Im trying to create a stored procedure of the following code. I want to set it so that I have to send the first 4 variables (@DB, @BackUpFile,@TestDB,@RestoreFile). I am having trouble when i try to save it...SQL Server wants me to decalre the variables. How would I go about making this a stored procedure correctly? Here is the code: USE master GO
0
2146
by: raj.raghavan | last post by:
Hi, I have a database were all the indexes are in a seperate filegroup a few large tables are in a seperate filegroup. We take backup at different times and I have backup of primary, two filegroup and then transaction logs. The backup was successful when I restore the same backup it is erroring out with this error: Server: Msg 3135, Level 16, State 2, Line 1 The backup set in file 'E:\Manual Backup\test_primary.bak' was created by...
5
7110
by: smoi | last post by:
Hi all, My manager ask me to do backup for 3 database and restore them in a new server. I did the backup for the 3 database into BAK file. Then in the new server, when I did the restore in SQL Server Enterprise Manager by using their restore function and selecting device(s) for the BAK file, I encounter the different messages such as the following: 1. Microsoft SQL-DMO (ODBC SQLState: 4200) The media family on device 'C:\Backup.BAK' is...
5
2786
by: Nasif | last post by:
Hello All I am currently doing a project on MS SQL Server 2005 where I am in need of table level backup/restore. I know about FILEGROUP. But in our project using FILEGROUP is not feasible. As far as I know MS SQL Server 2005 does not support Table level restore directly. Moreover relational integrity is also matter. Is there any clever trick or 3rd party free software to do table level restore/backup? Please Help.
0
9521
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10107
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9900
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9765
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8768
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7324
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5361
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3442
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2733
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.