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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 copy one table from one server to another server

Author  Topic 

Sun Foster
Aged Yak Warrior

515 Posts

Posted - 2005-05-27 : 22:51:24
how to copy one table from one server to another server if another server without name, only IP address, eg. 123.181.222.2
If use:
select * into newtable from [123.181.222.2].database_name.mytable

Error occur!

nr
SQLTeam MVY

12543 Posts

Posted - 2005-05-28 : 05:56:43
Create a linked server then include the owner in the query.

select * into newtable from [123.181.222.2].database_name.dbo.mytable

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

Sun Foster
Aged Yak Warrior

515 Posts

Posted - 2005-05-28 : 06:43:31
I use
exec sp_addlinkedserver 123.181.222.2, but got error
Go to Top of Page

Sun Foster
Aged Yak Warrior

515 Posts

Posted - 2005-05-28 : 06:51:08
use
exec sp_addlinkedserver '123.181.222.2'

select * into newtable from [123.181.222.2].database_name.dbo.mytable
error:
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
Go to Top of Page
   

- Advertisement -