Relational database management system (RDBMS) stored procedures can be an efficient, productive approach to obtain data from a foreign data source. In general, using stored procedures can help reduce network traffic, promote better performance, and improve response time because the server-side processing of the stored procedure can be accomplished without communicating with the client; once this processing is completed, the server returns only the data results to the requesting client.
See
RDBMSStored Procedure Details for a complete discussion of various RDBMS stored procedure and send-sql- statement techniques and enhancements you can use to run against the MS SQL Server DataServer.