Discussion Locked

Connect diff.Server from SQL stored Proc

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I need to pull in data from another ODBC database inside a Stored Procedure which resides on an SQL database/server using T-SQL

3 replies

by jmiller1

Your DBA needs to set up a "linked server" to communicate between the server the Stored Proc resides on and the one you want to pull the outside data from. (See sp_addlinkedserver). After that, you would access the data using something like 'SELECT * FROM servername.databasename.tableowner.tablename'.

jm

This discussion is closed to new replies.