Home
%3CLINGO-SUB%20id%3D%22lingo-sub-368824%22%20slang%3D%22en-US%22%3ELesson%20Learned%20%239%3A%20sp_execute_fanout%20was%20deprecated%20and%20replaced%20by%20sp_execute_remote%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-368824%22%20slang%3D%22en-US%22%3E%0A%20%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3DUTF-8%22%20%2F%26gt%3B%3CSTRONG%3EFirst%20published%20on%20MSDN%20on%20Dec%2028%2C%202016%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%20Within%20Cross-Database%20Queries%20we%20have%20the%20option%20to%20run%20a%20procedure%20using%20parameters%20using%20%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fen-us%2Fblog%2Fquerying-remote-databases-in-azure-sql-db%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20sp_execute_fanout%20%3C%2FA%3E%20.%26nbsp%3BThis%20execution%20could%20be%20a%20Transact-SQL%20statement%20on%20a%20single%20remote%20Azure%20SQL%20Database%20or%20set%20of%20databases%20serving%20as%20shards%20in%20a%20horizontal%20partitioning%20scheme.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20From%20time%20ago%2C%20if%20you%20try%26nbsp%3Bto%20execute%20%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fen-us%2Fblog%2Fquerying-remote-databases-in-azure-sql-db%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20sp_execute_fanout%20%3C%2FA%3E%20you%20will%20have%20an%20error%20that%20this%20function%20doesn%E2%80%99t%20exist.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20This%20function%20%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fen-us%2Fblog%2Fquerying-remote-databases-in-azure-sql-db%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20sp_execute_fanout%20%3C%2FA%3E%20has%20been%26nbsp%3Breplaced%20by%20%3CA%20href%3D%22https%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Fmt703714.aspx%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20sp_execute_remote%20%3C%2FA%3E%20.%20Please%2C%20use%20the%20new%20one%20instead%20of%20%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fen-us%2Fblog%2Fquerying-remote-databases-in-azure-sql-db%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20sp_execute_fanout%3C%2FA%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-368824%22%20slang%3D%22en-US%22%3EFirst%20published%20on%20MSDN%20on%20Dec%2028%2C%202016%20Within%20Cross-Database%20Queries%20we%20have%20the%20option%20to%20run%20a%20procedure%20using%20parameters%20using%20sp_execute_fanout.%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-368824%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20SQL%20Database%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Ecross%20query%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Edoesnt%20exist%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Eelastic%20query%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFunction%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Esp_execute_fanout%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Esp_execute_remote%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
First published on MSDN on Dec 28, 2016
Within Cross-Database Queries we have the option to run a procedure using parameters using sp_execute_fanout . This execution could be a Transact-SQL statement on a single remote Azure SQL Database or set of databases serving as shards in a horizontal partitioning scheme.

From time ago, if you try to execute sp_execute_fanout you will have an error that this function doesn’t exist.

This function sp_execute_fanout has been replaced by sp_execute_remote . Please, use the new one instead of sp_execute_fanout