Transfering table data from one database to another

5 pts.
Tags:
Multiple databases
SQL Server 2005
I am using SQL Server 2005 i m inserting some data from one database to another. both Servers are resided on different machine.

Answer Wiki

Thanks. We'll let you know when a new response is added.

So, what’s the problem? please specify that

I assume your question is how do you move data directly from 1 database to another? Actually, Mr. Denny taught me this just a couple of weeks ago. It is really easy. Here’s the syntax (assuming you’re logged on to the database where the data is currently located):

Insert into other_server\other_database.table_name
select column1, column2, column3
from original_table
where whatever = whatever;

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Sqlhnd
    Create a link server. between two servers . or thru dts/ssis transfer data between database on different servers.
    30 pointsBadges:
    report
  • Brijesh
    Hi,

    Try this SELECT ... INTO creates a new table. You'll need to use INSERT. Also, you have the database and owner names reversed.
    INSERT INTO DB1.dbo.TempTable
    SELECT * FROM DB2.dbo.TempTable
    10,185 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following