Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

URGENT How can i Copy a database from one pc to other

Posted on 2001-07-10
Last Modified: 2008-03-10
can u help me how can i copy my database from one pc to other from floppy can it be possible.

i have tried backup,import,export but failed

please tell me in detail to take a databse and restore to another server in a floppy
Question by:pawankk
  • 4
  • 2
  • 2
  • +3

Expert Comment

ID: 6271625
If the database is small enough, follow the stes below:

1) dump database to a file
2) If needed, pkzip or winzip it (hopefully it will be small enough to fit it in a floppy)
3) Copy the file to floppy
4) Copy the file back to the other system which is running the server (If necessary to appropriate directory)
5) run the load database from file command.

This should work.

Expert Comment

ID: 6271720
You can use sp_attach_db system stored procedure in this case.
Read about this stored procedures in the SQL Server Books Online.

This is the example (to copy Test database):

1. Copy Test.mdf and Test.ldf files into C:\MSSQL7\data directory
   (path by default).
2. Run this from the Query Analyzer:

    sp_attach_db @dbname = 'Test',
                 @filename1 = 'C:\MSSQL7\data\Test.mdf',
                 @filename2 = 'C:\MSSQL7\data\Test.ldf'

Read also about "INF: Moving SQL Server 7.0 Databases to a New Location"

Hope this helps
LVL 70

Expert Comment

by:Éric Moreau
ID: 6272965
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.


Expert Comment

ID: 6280235
Well, this really depends on the current size of your database. I assume the two machines are not connected in any way, either by LAN or local connection? If they're not, and cannot be connected in any way, you're only option is to dump the database and restore it on the other machine, but of course the dump may exceed 1.44MB. You can get file splitter utlities, usually available as Freeware from download.com or other sites, to split large files over several disks. Alternatively you can use WinZip to zip the file up over several disks.

There are many options but a database backup/restore is inevitable if the machines are not connected.

Expert Comment

ID: 6280367
And the details depend on what version of MS SQL Server you are running. In 6.5;

On the original machine;
- create a new dump device in SQL Server
- perform a full database backup to that dump device
At OS level;
- zip the dump file across several disks on old machine
- unzip onto new machine

On the new machine;
- create database devices for the database in SQL Server (ensure same sizes are used)
- restore dump file into new database

That's it!

Author Comment

ID: 6281629
i m using sql sever 7.0 .

i have tried backup and restore it gives an error that it cannot be restored in sigle user mode......

i have also tried
sp_attach_db @dbname = 'Test',
                @filename1 = 'C:\MSSQL7\data\Test.mdf',
                @filename2 = 'C:\MSSQL7\data\Test.ldf'

but it gives an error that it cannot restore an external database

Accepted Solution

Dangerman earned 50 total points
ID: 6285059
When you use the SQLServer Backup routine, is the database in Single User mode? What's the exact error message you get when you try to restore the database?

I haven't used SQLServer 7.0 myself, but assume the functionality is similar to that in 6.5. I never have my databases in Single User mode when taking backups, I just ensure there is no activity in the database at that time.

If you've created new database devices on the new machine, make sure they are the same size as the originals. Also make sure the new database you create, prior to restoring your backup, is not in Single User mode. In 6.5 you can do this in the Enterprise Manager, by right-clicking on the DB name, selecting Edit, then look at the checkboxes on the Options screen.

Author Comment

ID: 6295678
it gives me following problem please tell me is there any solution for these problems while copying or importing etc.

Server: Msg 1816, Level 16, State 1, Line 1
Could not attach the database because the character set, sort order, or Unicode collation for the database differs from this server.
Server: Msg 1816, Level 16, State 1, Line 1
Could not attach the database because the character set, sort order, or Unicode collation for the database differs from this server.
Warning: Unicode comparison flags 196611 in database differs from server Unicode comparison flags of 196609.
Warning: Unicode comparison flags 196611 in database differs from server Unicode comparison flags of 196609.

Expert Comment

ID: 6307787
You will get these errors when the SQL Server into which you are importing the backup has been installed with a different character set and sort order. In 6.5 these options are specified when you install SQL Server on the server, not sure about SQL 7 though. You need to identify which character set and sort order are set up on the original server and ensure SQL Server is configures with these on the new server.

Expert Comment

ID: 6875224

These questions are still open, and our records show you have logged in recently. Please resolve them appropriately as soon as possible. Continued disregard of your open questions will result in the force/acceptance of a comment as an answer; other actions affecting your account may also be taken. I will revisit these questions in approximately seven (7) days.


EXPERTS: Please leave your thoughts on this question here.


Community Support Moderator
Experts Exchange

Expert Comment

ID: 6971733
Admin notified of User neglect. Force-accepted by
CS Moderator

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Microsoft – Kerberos Configuration Manager. Delegation service account query 1 37
Row insertion failed. Array 5 48
SQL, add where clause 5 23
sql server query 18 39
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question