Sunday, May 4, 2008

Bug in SQL Server 2000 when create store procedure contain linked server

When I created store procedure command contained linked server in its. I founded error message below.

Error 7405: Heterogeneous queries require the ANSI_NULLS and ANSI_WARNINGS options to be set for the connection. This ensures consistent querysemantics. Enable these options and then reissue your query.

Just insert the following commands before creating/updating your store procedure or function.

SET ANSI_NULLS ON
SET ANSI_WARNINGS ON
GO
CREATE FUNCTION dbo.functionName
...
END

References
http://support.microsoft.com/kb/296769
http://www.nophadon.com/2004/03/18/error-7405-heterogeneous-queries-sql-server-2/

No comments:

Post a Comment