Executing a Stored Procedure Via a Linked Server


It is possible to execute a stored procedure via a linked server. The server that is hosting the client connection will accept the client's request and send it to the linked server. The EXECUTE statement must contain the name of the linked server as part of its syntax:

 EXECUTE  servername.dbname.owner.procedure_name  

This example executes sp_helpsrvrole on SWServer , which shows a list of available fixed server roles on the 'SWServer' remote server:

 EXEC SWServer.master.dbo.sp_helpsrvrole 


Microsoft SQL Server 2000 Unleashed
Microsoft SQL Server 2000 Unleashed (2nd Edition)
ISBN: 0672324679
EAN: 2147483647
Year: 2002
Pages: 503

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net