I've programmed a user defined function (SQL2000), which in a specific query
references a linked server (another SQL instance, BTW contained in same
physical server). The sintaxis is ok, but i couldn't apply the definition
because of following error:
"Error 7405: Heteogeneous queries require the ANSI_NULLS and ANSI_WARNINGS
options to be set for the connection. This ensures consistente
query semantics. Enable these options and then reissue your query."
I set the corresponding settings in both servers, section Connections of
Server's properties, but to no avail.
Which is the trick here? How is resolved the 'connection' issue referred in
the error message?
Thanks in advanceMiguel Castanuela (MiguelCastanuela@.discussions.microsoft.com) writes:
> I've programmed a user defined function (SQL2000), which in a specific
> query references a linked server (another SQL instance, BTW contained in
> same physical server). The sintaxis is ok, but i couldn't apply the
> definition because of following error:
> "Error 7405: Heteogeneous queries require the ANSI_NULLS and ANSI_WARNINGS
> options to be set for the connection. This ensures consistente
> query semantics. Enable these options and then reissue your query."
> I set the corresponding settings in both servers, section Connections of
> Server's properties, but to no avail.
> Which is the trick here? How is resolved the 'connection' issue referred
> in the error message?
The trick is to stop using Enterprise Manager for editing functions and
stored procedures. Use Query Analyzer instead, this is a far better tool
for the task.
The particular problem here, is that Enterprise Manager creates functions
and procedures with ANSI_NULLS and QUOTED_IDENTIFIER OFF, and these
settings are saved with the procedure/function. Thus you need to recreate
the function with ANSI_NULLS ON. (In Query Analyzer all needed options
are ON by default.)
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Many thanks, it resolves the problem.
In ahead I will take this great tip in account.
"Erland Sommarskog" wrote:
> Miguel Castanuela (MiguelCastanuela@.discussions.microsoft.com) writes:
> The trick is to stop using Enterprise Manager for editing functions and
> stored procedures. Use Query Analyzer instead, this is a far better tool
> for the task.
> The particular problem here, is that Enterprise Manager creates functions
> and procedures with ANSI_NULLS and QUOTED_IDENTIFIER OFF, and these
> settings are saved with the procedure/function. Thus you need to recreate
> the function with ANSI_NULLS ON. (In Query Analyzer all needed options
> are ON by default.)
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/pr...oads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodin...ions/books.mspx
>
Showing posts with label settings. Show all posts
Showing posts with label settings. Show all posts
Wednesday, March 21, 2012
Question on Settings in Connection
Saturday, February 25, 2012
Question on Collation
I have some questions about Collation Settings.
- if my db need to handle traditional chinese, simplified chinese and english, which collation should i use? Is CHINESE_PRC_CI_AS ok?
- what is meant by 'Anicent Sensitive'?
- if my db need to handle traditional chinese, simplified chinese english, japanese and korean, then which collation support these languages?
- How to make the database support unicode? Is is just using nvarchar, ntext, nchar instead of varchar, text and char?
ThanksUnicode allows the use of 16 bit characters. A Unicode string can contain almost any character used on earth, including Roman, Cyrilic, Hebrew, Arabic, Hindu, Chinese, Japanese, Korean, and others. The NCHAR, NTEXT, and NVARCHAR data types support Unicode data.
No collation that I know of will support traditional chinese without using Unicode.
I'm pretty sure that you mean "Accent Insensitive", meaning that accents are ignored, so that A, , , and all of their other accented variations are considered to be equivalent.
I'd store your data in Unicode columns, and only force collation on them when needed for things like sorting and comparison.
-PatP
- if my db need to handle traditional chinese, simplified chinese and english, which collation should i use? Is CHINESE_PRC_CI_AS ok?
- what is meant by 'Anicent Sensitive'?
- if my db need to handle traditional chinese, simplified chinese english, japanese and korean, then which collation support these languages?
- How to make the database support unicode? Is is just using nvarchar, ntext, nchar instead of varchar, text and char?
ThanksUnicode allows the use of 16 bit characters. A Unicode string can contain almost any character used on earth, including Roman, Cyrilic, Hebrew, Arabic, Hindu, Chinese, Japanese, Korean, and others. The NCHAR, NTEXT, and NVARCHAR data types support Unicode data.
No collation that I know of will support traditional chinese without using Unicode.
I'm pretty sure that you mean "Accent Insensitive", meaning that accents are ignored, so that A, , , and all of their other accented variations are considered to be equivalent.
I'd store your data in Unicode columns, and only force collation on them when needed for things like sorting and comparison.
-PatP
Subscribe to:
Posts (Atom)