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

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
Who is Participating?

Improve company productivity with a Business Account.Sign Up

DangermanConnect With a Mentor Commented:
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.
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.
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
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

Éric MoreauSenior .Net ConsultantCommented:
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.
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!
pawankkAuthor Commented:
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
pawankkAuthor Commented:
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.
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.

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
Admin notified of User neglect. Force-accepted by
CS Moderator
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.