473,382 Members | 1,359 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Easiest way to copy a MS-SQL Database from one machine to another

Can anyone recommend the easiest way to get a full copy of a database from
one server to another. The servers are not part of the same organization or
network.

I have received a backup of the database created with enterprise manager but
am unable to restore it into a database of the same name on my server.

Thanks,

Kevin

Jul 23 '05 #1
5 7941

"Kevin" <no*****@provided.com> wrote in message
news:tr_Zd.699401$8l.384177@pd7tw1no...
Can anyone recommend the easiest way to get a full copy of a database from
one server to another. The servers are not part of the same organization
or
network.

I have received a backup of the database created with enterprise manager
but
am unable to restore it into a database of the same name on my server.

Thanks,

Kevin


http://support.microsoft.com/default...b;en-us;314546

Backup and restore is usually the easiest way - if you're having a problem
restoring a backup, then I suggest you post whatever error message you get.
You can also try restoring from Query Analyzer:

restore database MyDB from disk = 'c:\temp\db.bak'

Sometimes errors in QA are more informative than what EM tells you. See the
full RESTORE syntax in Books Online for moving file locations etc.

Simon
Jul 23 '05 #2
Did you checked the paths to database files before restoring?

If you are using the EM restore database function, the database name
doesn't matter. You can name your new database as you would like to.
The only importand thing is, check the path, where the database should
be restored to.

If the backup was done on other server, probably the Db files was
located under different path (for example: C:\Program
Files\Database\database_name.mdf").

Lets say, that you try to restore it over database BUBU. In this case,
you can have totaly diff. path and of course filenames .... (for
example: "C:\Databases\BUBU_Data.mdf). Therefore, you'll get an error
message, that the files does not match. This is because why, database
reads information from backup about location of database ...

Greatings

Matik

Jul 23 '05 #3
Simon,

I've tried restoring from QA, the directories for the other server and my
server are different so I am using the MOVE option for the data and log
files. The same problem occurs that I was getting using EM, it complains
that the logical file being restored is not part of my database. I've tried
this without a database called 'Test', as well as after creating one and
using the RESTORE FILELISTONLY but the error message is always the same:

here's the code and error message:

RESTORE DATABASE Test FROM DISK = 'C:\Backups\Project Recovery\Sample
Data\RebillingMarch102005.SQLBackup'
WITH NORECOVERY,
MOVE 'g:\mssql\data\rebilling_Data.MDF' TO 'C:\Program Files\Microsoft
SQL Server\MSSQL\Data\Rebilling_Data.mdf',
MOVE 'E:\MSSQL\log\rebilling_Log.LDF' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL\Data\Rebilling_Log.ldf'

response:
Server: Msg 3234, Level 16, State 2, Line 1
Logical file 'g:\mssql\data\rebilling_Data.MDF' is not part of database
'Test'. Use RESTORE FILELISTONLY to list the logical file names.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.

Thanks,

- Kevin

"Simon Hayes" <sq*@hayes.ch> wrote in message
news:42**********@news.bluewin.ch...

"Kevin" <no*****@provided.com> wrote in message
news:tr_Zd.699401$8l.384177@pd7tw1no...
Can anyone recommend the easiest way to get a full copy of a database from one server to another. The servers are not part of the same organization
or
network.

I have received a backup of the database created with enterprise manager
but
am unable to restore it into a database of the same name on my server.

Thanks,

Kevin

http://support.microsoft.com/default...b;en-us;314546

Backup and restore is usually the easiest way - if you're having a problem
restoring a backup, then I suggest you post whatever error message you

get. You can also try restoring from Query Analyzer:

restore database MyDB from disk = 'c:\temp\db.bak'

Sometimes errors in QA are more informative than what EM tells you. See the full RESTORE syntax in Books Online for moving file locations etc.

Simon

Jul 23 '05 #4

Instead of 'g:\mssql\data\rebilling_Data.*MDF' use
'rebilling_Data.*MDF' and
rebilling_Log.*LDF'

Madhivanan

Jul 23 '05 #5
The first name after "MOVE" should be the logical file name, not the
physical. In your case, probably, "rebilling_Data" and "rebilling_Log"
are the logical names you need to use.

Jul 23 '05 #6

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

Similar topics

9
by: CY FOK | last post by:
Hi I am planning to open a software company to develop client-server apps and web applications for my client. Now, i am in a difficult situation to determine what is the best platform i should use...
2
by: Matthias S. | last post by:
Hi, I'm just wondering about the easiest way to copy certain values from a collection to a simple array. Say I've got a class (RaceCarDriver) with a DateFirstRace property. Now I'd like to...
5
by: lion | last post by:
in .net, if you set annstance-A of a class equal to another instance-B, a pointer will add to B, but if i want to create a copy of B instead of pointer, how to operate? Note:serialization...
1
by: Kevin | last post by:
Hello experts, I'm a newbee to ASP.NET. And I have been struggling solving this problem. But I can't do it. Can you please help me get over this wall? Below is the code and error message: <%@...
3
by: G. Dean Blake | last post by:
In a ASP.NET Visual Studio project I have a webform named FinResults_AR.aspx and its associated vb and resx files. I want to copy and rename to FinResults_GL so that I have an exact duplicate...
2
by: Martin Ortiz | last post by:
Ugh.... All classes are copy by reference, even if you use "ByVal" and NOT "ByRef" it's still a copy by reference. Of course, as a consequence, if you change any values of the object you passed...
5
by: BenW | last post by:
Hello, What is the easiest way to make "deep copy" of my Hashtable? How about with other Collection classes in C#, any documents available? I don'r actually understand why Framework's...
0
by: milkyman | last post by:
Hi there all, I have a question about MS Outlook. Is it posible to open MS outlooks calandar(in background) and take a screen dump and put this screendump on a picturebox. The reason i ask...
1
by: cableguy47905 | last post by:
I have read a previous entry and it really helped, but I keep getting an error. The previous entry was: If you mean you want to carry the current values of the controls over into a new record...
11
by: not_a_commie | last post by:
So is it legal to copy stuff out of the .NET framework and mix it into your own code? I assume so, since I could call their function directly if I didn't want to avoid the UI library reference in...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.