1

I'm trying to copy data from one table to another table in a different database. After right clicking I have got an option Tasks, under it there are only the two options:

  • Export Data...
  • Import Data...

... but no option for Copy Data....

How can I solve this issue?

Thanks in advance.

0

3 Answers 3

4

You should use Export data and choose data source as SQL server native client (Version) as source and select your source SQL server instance and You should select the same for the destination with your Destination server name. On the next window select table, you want to copy and Run the wizard. This will copy all the data from your source table to destination table.

Also the copy database wizard is used to create a copy of your database not for copying data from table to table. Also if you can't see this option most probably you are using express edition here

The Copy Database Wizard is not available in the Express edition.

1

I may be wrong here, but do you think that export data removes the data from the table? It doesn't, it copies the data to file. So if you don't want to use replication. or create a databaselink and use SQL to copy data, then this export/import job can do it.

0

If you just need to import/export data from/to a table you can do it with command line utility bcp (more info here).

First you can export data from the source database to a file:

bcp [DB_NAME].[SCHEMA_NAME].[TABLE_NAME] out d:\data.bcp -c -S YOUR_SERVER_NAME -U YOUR_USER_NAME -P YOUR_PASSWORD

then you can import data from the file created with the previous command in the destination database:

bcp [DB_NAME].[SCHEMA_NAME].[TABLE_NAME] in d:\data.bcp -c -S YOUR_SERVER_NAME -U YOUR_USER_NAME -P YOUR_PASSWORD

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.