Once you've set up the Linked Server, you can write SQL statements directly against the Linked Server. For example,...
you could write the statement INSERT INTO local_table…SELECT col1, col2,… FROM linked_server.db1.dbo.foo.
When importing data from text files, simply use the BULK INSERT statement or, my preference, call the BCP command line utility using XP_CMDSHELL within the stored procedure. It takes a little work to get the exact XP_CMDSHELL string correct. All you have to do is encapsulate the BCP command-line string within a parameter for XP_CMDSHELL extended stored procedure.
Do you have comments on this Ask the Expert Q&A? Let us know.
Dig Deeper on Microsoft SQL Server Installation
Related Q&A from Kevin Kline
Monitoring and Administration expert Kevin Kline discusses the obstacles of database administration when a publisher resides on a different domain. Continue Reading
A common SQL Mail error is addressed by monitoring and administration expert Kevin Kline. Continue Reading
Monitoring and Administration expert Kevin Kline discusses the installation of SQL Server client tools on Windows XP Pro. Continue Reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.