ANSI_NULL And ANSI_QUOTED_IDENTIFIER
Feb 26, 2004I am trying to set these two options to ON for default sp creation. or at LEAST be able to set them for sp's accessing databases on remote servers.
Seems though, that no matter what I set the rekated checkboxes to in the "edit SQL Server registration properties"'s connections pane, they get created as:
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE [dbo].[sp_yada_yada_yada]
AS
DECLARE @YoMama float
DECLARE @YoDaddy float
DECLARE @YoSista float
SET @YoSista = @YoDadd + @YoMama
RETURN
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
(which I assume is a previous/default setting of some type).
I also had someone tell me that I need to set those params when I initially register the server, but I can't see any option to do so when I register my server(s) *scratching head*
I even verified in the connection pane's "running values" radio button, and they ARE checked (as I expected) but creating a new SP STILL results in the incorrect option settings being auto-magically applied.
help???
Thanks!
Any SET options that affect the results generated by Transact-SQL statements must have the same settings for all operations referencing the index. There are seven SET options that affect the results stored in computed columns and returned by views. All connections using indexes on computed columns or indexed views must have the same settings for these seven options:
These six SET options must be set to ON:
ANSI_NULLS
ANSI_PADDING
ANSI_WARNINGS
ARITHABORT
CONCAT_NULL_YIELDS_NULL
QUOTED_IDENTIFIER
The NUMERIC_ROUNDABORT option must be set to OFF.
These SET options must be set correctly for any connection that creates an index on a view or computed column. Any connection executing INSERT, UPDATE or DELETE statements that change data values stored in the indexes must have the correct settings.