Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 insert data from one table to another

Author  Topic 

yaman
Posting Yak Master

213 Posts

Posted - 2009-01-23 : 07:53:57
sir

I want to insert data From one server to another server Databse table .

How can i do .
pls help me out .

Yaman

raky
Aged Yak Warrior

767 Posts

Posted - 2009-01-23 : 07:55:35

If u want to insert data from one server table to another server table
first create linked server for them

Afterwards

insert into server2.db2.schema.table2
select * from server1.db1.schema.table1
Go to Top of Page

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2009-01-23 : 19:05:26
If linking servers is not an option, you can use DTS or SSIS. To use DTS, (in SQL 2005), right click on the database in object explorer in SSMS, and select Tasks->Import Data, and follow the instructions in the wizard.
Go to Top of Page

Nageswar9
Aged Yak Warrior

600 Posts

Posted - 2009-01-23 : 22:48:10
Try this Also,
Select * into server2.db2.schema.table2 From server1.db1.schema.table1
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-24 : 08:47:27
or even use OPENROWSET if its for adhoc access

http://msdn.microsoft.com/en-us/library/ms190312.aspx
Go to Top of Page
   

- Advertisement -