0

Hi all,

i want to transfer data one sql database to another database in same sql server. i try to insert into table2 select * from table1 , but this query useful for same database, but i want to use different database, in same sql server.

help me here to solve this problem,

mrugesh

6
Contributors
6
Replies
8
Views
8 Years
Discussion Span
Last Post by xuqi
0

This query copies the table "madExcept" from the "Bugs" database to the "ShotgunHill" database:

Select * Into ShotgunHill..madExcept From Bugs..madExcept

Doing this does not recreate the table properly in the destination database though. Many table constraints, such as Primary Key, will not be set up properly when you select into another table. You are better off to use backups/restore as adatapost mentioned.

0

This query copies the table "madExcept" from the "Bugs" database to the "ShotgunHill" database:

Select * Into ShotgunHill..madExcept From Bugs..madExcept

Doing this does not recreate the table properly in the destination database though. Many table constraints, such as Primary Key, will not be set up properly when you select into another table. You are better off to use backups/restore as adatapost mentioned.

Hi thr,

THANK YOU VERY MUCH TO GIEV RESPONSE, BUT I GET MY OLUTION BY MYSELF, AND MY APPLICATION WORK PROPERLY.

THANKS ONCE AGAIN.

MRUGESH

0

i want to transfer millions of records from Microst SQL To Another Microsoft SQL Provided with a Pause Button.When The Application Close .After the Application Open It Should Show Resume and transfer the Data

0

Use bulk copy, from microsoft, can be found in odbc reference api, dblib, ctlib etc, it comes in many forms, early version came as a command bcp, than dblib now is masked on top of odbc or oledb, just write some code in order to make a bulk copy, for me worked, 10 millions records in aprox. 1 minute

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.