Home All Groups Group Topic Archive Search About
Author
20 May 2006 5:44 AM
Derek Hart
Using SQL Server 2000, and VS.Net 2003

I want to load a datatable from a local server into a dataset and update it
into a linked server.  The linked server will have the exact same structured
table, and it will be empty.  Can I open a blank dataset from the linked
server, and fill it with the dataset from the local server?  I have been
trying every which way to get this working.  Is it possible?  It is too slow
doing a transact sql statement that does the insert from the local to the
linked, so I am trying this method.  Any thoughts?

Derek

Author
20 May 2006 11:17 AM
Tasos Vogiatzoglou
.... A more "SQL" approach

EXEC sp_addlinkedserver 'your server'
EXEC sp_addlinkedsrvlogin 'your server', 'false', 'luser', 'rmtuser',
'rmtPassword'


SELECT * INTO YOUR_TABLE FROM YOUR_SERVER.DATABASE.dbo.TABLE

or

INSERT INTO YOUR_TABLE (COLUMNS) SELECT COLUMNS FROM
YOUR_SERVER.DATABASE.dbo.TABLE


Regards,
Tasos
Author
20 May 2006 11:22 AM
Tasos Vogiatzoglou
Forgot to mention that you should

EXEC sp_dropserver 'your server', 'droplogins'

after finishing.

Tasos