﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Article Discussions / Article Discussions by Author / Discuss content posted by bitbucket  / SET Options - 1 / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Tue, 21 May 2013 10:36:16 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: SET Options - 1</title><link>http://www.sqlservercentral.com/Forums/Topic1396465-1222-1.aspx</link><description>[quote][b]malleswarareddy_m (2/26/2013)[/b][hr]Thanks for great question. Please keep on posting QOTD Ron. You question and answers are always good.[/quote]Thank you ..............</description><pubDate>Wed, 27 Feb 2013 06:44:18 GMT</pubDate><dc:creator>bitbucket-25253</dc:creator></item><item><title>RE: SET Options - 1</title><link>http://www.sqlservercentral.com/Forums/Topic1396465-1222-1.aspx</link><description>Thanks for great question. Please keep on posting QOTD Ron. You question and answers are always good.</description><pubDate>Tue, 26 Feb 2013 18:44:12 GMT</pubDate><dc:creator>malleswarareddy_m</dc:creator></item><item><title>RE: SET Options - 1</title><link>http://www.sqlservercentral.com/Forums/Topic1396465-1222-1.aspx</link><description>Greate Question!</description><pubDate>Tue, 15 Jan 2013 12:47:20 GMT</pubDate><dc:creator>asifkareem</dc:creator></item><item><title>RE: SET Options - 1</title><link>http://www.sqlservercentral.com/Forums/Topic1396465-1222-1.aspx</link><description>[quote][b]john.arnott (12/15/2012)[/b][hr]SanDroid, your explanation has me puzzled.  The first quote says that one cannot use an expression containing a float expression in the key column of an indexed view.  By itself, this would appear not to apply to the QOD situation where the index is based on an INT column.   How then is this a clear explanation for prohibiting the use of an index on a view if Numeric_RoundAbort is On? Wouldn't that setting only affect the evaluation of an expression that depended on a float or other expression that's not strictly deterministic at the lowest (machine) level?The second part of your explanation didn't help me any more than the first. You pose an apparently rhetorical question, "How would the database engine test the values of an indexed view for the right data percision when executing or running the TSQL from a client if that client connection has the SET option ARITHABORT turned ON?" I don't follow why that setting (or NUMERIC_ROUNDABORT turned OFF as I think you may have meant) would affect what the engine would do with an INT column.Your final paragraph actually echoes Hugo when you say it [b][i]seems likely[/i] [/b]the engine would have to test the absolute deterministic characteristics of all components of the view index.  If I may take that thought forward, wouldn't that mean the engine instead just says "if NUMERIC_ROUNDABORT is OFF, then non-deterministic values COULD be there, and I don't want to go looking for that possibility deep down inside". This would be how I understood Hugo's speculation, back where we started.  Can this be cleared up WITHOUT speculation?[/quote]Thanks for writing this so I didn't have to :-)</description><pubDate>Tue, 18 Dec 2012 23:50:04 GMT</pubDate><dc:creator>Paul White</dc:creator></item><item><title>RE: SET Options - 1</title><link>http://www.sqlservercentral.com/Forums/Topic1396465-1222-1.aspx</link><description>Learnt something new...</description><pubDate>Mon, 17 Dec 2012 21:08:58 GMT</pubDate><dc:creator>kalyani.k478</dc:creator></item><item><title>RE: SET Options - 1</title><link>http://www.sqlservercentral.com/Forums/Topic1396465-1222-1.aspx</link><description>I love indexed viewsActually I [b]hate [/b]indexed viewsActually I [b]love [/b]indexed viewsActually I [b]hate [/b]indexed viewsActually I [b]love [/b]indexed viewsActually I [b]hate [/b]indexed viewsActually I [b]love [/b]indexed viewsActually I [b]hate [/b]indexed viewsActually I [b]love [/b]indexed viewsetc etc etc.Actually, they are good sometimes but seldom worth the effort :-)</description><pubDate>Mon, 17 Dec 2012 05:28:15 GMT</pubDate><dc:creator>DavidBridgeTechnology.com</dc:creator></item><item><title>RE: SET Options - 1</title><link>http://www.sqlservercentral.com/Forums/Topic1396465-1222-1.aspx</link><description>Argh!I did read the docs, but I got too focused on the index creation itself, which will fail if numeric_roundabort is on, but the info on update/insert etc. didn't really sink in.Thank you for the question.</description><pubDate>Mon, 17 Dec 2012 00:46:17 GMT</pubDate><dc:creator>Keld Laursen (VFL)</dc:creator></item><item><title>RE: SET Options - 1</title><link>http://www.sqlservercentral.com/Forums/Topic1396465-1222-1.aspx</link><description>SanDroid, your explanation has me puzzled.  The first quote says that one cannot use an expression containing a float expression in the key column of an indexed view.  By itself, this would appear not to apply to the QOD situation where the index is based on an INT column.   How then is this a clear explanation for prohibiting the use of an index on a view if Numeric_RoundAbort is On? Wouldn't that setting only affect the evaluation of an expression that depended on a float or other expression that's not strictly deterministic at the lowest (machine) level?The second part of your explanation didn't help me any more than the first. You pose an apparently rhetorical question, "How would the database engine test the values of an indexed view for the right data percision when executing or running the TSQL from a client if that client connection has the SET option ARITHABORT turned ON?" I don't follow why that setting (or NUMERIC_ROUNDABORT turned OFF as I think you may have meant) would affect what the engine would do with an INT column.Your final paragraph actually echoes Hugo when you say it [b][i]seems likely[/i] [/b]the engine would have to test the absolute deterministic characteristics of all components of the view index.  If I may take that thought forward, wouldn't that mean the engine instead just says "if NUMERIC_ROUNDABORT is OFF, then non-deterministic values COULD be there, and I don't want to go looking for that possibility deep down inside". This would be how I understood Hugo's speculation, back where we started.  Can this be cleared up WITHOUT speculation?</description><pubDate>Sat, 15 Dec 2012 19:09:52 GMT</pubDate><dc:creator>john.arnott</dc:creator></item><item><title>RE: SET Options - 1</title><link>http://www.sqlservercentral.com/Forums/Topic1396465-1222-1.aspx</link><description>Excellent question.</description><pubDate>Fri, 14 Dec 2012 14:20:12 GMT</pubDate><dc:creator>L' Eomot Inversé</dc:creator></item><item><title>RE: SET Options - 1</title><link>http://www.sqlservercentral.com/Forums/Topic1396465-1222-1.aspx</link><description>[quote][b]Hugo Kornelis (12/14/2012)[/b] -The reason for this limitation? (Puts on speculative hat) Many settings are discouraged anyway, and I guess that MS decided not to put in extra engineering effort to support and test indexed views (and several other features with similar limitations) under all those settings. So they simply forbid them.[/quote]Now I understand why speculation is considered a negative speech pattern.Hugo, If you take a look at the SQL documentation the reason is clear. [quote]Even if an expression is deterministic, if it contains float expressions, the exact result may depend on the processor architecture or version of microcode. To ensure data integrity, such expressions can participate only as non-key columns of indexed views. Deterministic expressions that do not contain float expressions are called precise. Only precise deterministic expressions can participate in key columns and in WHERE or GROUP BY clauses of indexed views.[/quote]How would the database engine test the values of an indexed view for the right data percision when executing or running the TSQL from a client if that client connection has the SET option ARITHABORT turned ON?Apparently this has nothing to do with the testing practices of MS Engineers. :-P More likely it is the testing done by the Database Engine to data and columns that are to be included in the indexed view.In this specific example it is the testing of the data being inserted into a column that is participating in the indexed view.All of the above need to check the percision of the Data Types and that requires SET ARITHABORT OFF and several other OFF[quote]When creating and manipulating indexes on computed columns or indexed views, the SET options ARITHABORT, CONCAT_NULL_YIELDS_NULL, QUOTED_IDENTIFIER, ANSI_NULLS, ANSI_PADDING, and ANSI_WARNINGS must be set to ON. The option NUMERIC_ROUNDABORT must be set to OFF. If any of these options are not set to the required values, INSERT, UPDATE, and DELETE actions on indexed views or tables with indexes on computed columns will fail. SQL Server will raise an error listing all the options that are incorrectly set. Also, SQL Server will process SELECT statements on these tables or indexed views as though the indexes on computed columns or on the views do not exist.[/quote][url]http://msdn.microsoft.com/en-us/library/aa259205(v=sql.80).aspx[/url]Like my grandfather always said; "You are served better by knowing how to read than how to write." :cool:</description><pubDate>Fri, 14 Dec 2012 12:45:24 GMT</pubDate><dc:creator>SanDroid</dc:creator></item><item><title>RE: SET Options - 1</title><link>http://www.sqlservercentral.com/Forums/Topic1396465-1222-1.aspx</link><description>Nice question.</description><pubDate>Fri, 14 Dec 2012 11:58:29 GMT</pubDate><dc:creator>KWymore</dc:creator></item><item><title>RE: SET Options - 1</title><link>http://www.sqlservercentral.com/Forums/Topic1396465-1222-1.aspx</link><description>Ron, you made me scratch my head a lot... Thanks!</description><pubDate>Fri, 14 Dec 2012 11:58:28 GMT</pubDate><dc:creator>Revenant</dc:creator></item><item><title>RE: SET Options - 1</title><link>http://www.sqlservercentral.com/Forums/Topic1396465-1222-1.aspx</link><description>[quote][b]Toreador (12/14/2012)[/b][hr]Thanks for the easy question to end the week!;-)[/quote]Hey, what did I tell you??!!!  [b]&amp;gt;&amp;gt;&amp;gt;SMACK&amp;lt;&amp;lt;&amp;lt;[/b]:-Dron</description><pubDate>Fri, 14 Dec 2012 11:09:28 GMT</pubDate><dc:creator>ronmoses</dc:creator></item><item><title>RE: SET Options - 1</title><link>http://www.sqlservercentral.com/Forums/Topic1396465-1222-1.aspx</link><description>[quote][b]Koen Verbeeck (12/14/2012)[/b][hr]Great question to end the week. Had to do some research, but it was worth it.[/quote]I agree... the research as to the various set options was worth the time.</description><pubDate>Fri, 14 Dec 2012 09:55:02 GMT</pubDate><dc:creator>mtassin</dc:creator></item><item><title>RE: SET Options - 1</title><link>http://www.sqlservercentral.com/Forums/Topic1396465-1222-1.aspx</link><description>Great question. Got a little education today. Thanks.</description><pubDate>Fri, 14 Dec 2012 09:23:24 GMT</pubDate><dc:creator>Rob Schripsema</dc:creator></item><item><title>RE: SET Options - 1</title><link>http://www.sqlservercentral.com/Forums/Topic1396465-1222-1.aspx</link><description>Thanks Ron.  Very informative today.</description><pubDate>Fri, 14 Dec 2012 09:14:10 GMT</pubDate><dc:creator>SQLRNNR</dc:creator></item><item><title>RE: SET Options - 1</title><link>http://www.sqlservercentral.com/Forums/Topic1396465-1222-1.aspx</link><description>Good question, learned something today. Didn't think a numeric related setting would effect an action relating to textual information, oh well.Thanks,Lon</description><pubDate>Fri, 14 Dec 2012 09:13:42 GMT</pubDate><dc:creator>Lon-860191</dc:creator></item><item><title>RE: SET Options - 1</title><link>http://www.sqlservercentral.com/Forums/Topic1396465-1222-1.aspx</link><description>Thank you Hugo.(At least it wasn't something obvious I just wasn't seeing.)</description><pubDate>Fri, 14 Dec 2012 08:50:04 GMT</pubDate><dc:creator>Rich Weissler</dc:creator></item><item><title>RE: SET Options - 1</title><link>http://www.sqlservercentral.com/Forums/Topic1396465-1222-1.aspx</link><description>[quote][b]Rich Weissler (12/14/2012)[/b][hr]Great question.But, okay... I give up, how does having an indexed view cause a loss of precision?(I.e. Yep, I see the error.  I don't understand WHY.  :-( )[/quote]It doesn't. But there are specific settings required for making and maintaining indexed views, and this happens to be one of them.If you change the setting before trying to create the view, that in itself would already fail. (Or, to be more precise, creating the view would succeed, but creating the index to convert it from a normal into an indexed view would fail).The reason for this limitation? (Puts on speculative hat) Many settings are discouraged anyway, and I guess that MS decided not to put in extra engineering effort to support and test indexed views (and several other features with similar limitations) under all those settings. So they simply forbid them.</description><pubDate>Fri, 14 Dec 2012 08:41:05 GMT</pubDate><dc:creator>Hugo Kornelis</dc:creator></item><item><title>RE: SET Options - 1</title><link>http://www.sqlservercentral.com/Forums/Topic1396465-1222-1.aspx</link><description>I've been looking for Steve Moden's phone number, thanks....</description><pubDate>Fri, 14 Dec 2012 08:33:54 GMT</pubDate><dc:creator>jcrawf02</dc:creator></item><item><title>RE: SET Options - 1</title><link>http://www.sqlservercentral.com/Forums/Topic1396465-1222-1.aspx</link><description>Thanks for the great question Ron. I was unaware of this limitation and have definitely learned something today. :-)</description><pubDate>Fri, 14 Dec 2012 08:26:37 GMT</pubDate><dc:creator>Dana Medley</dc:creator></item><item><title>RE: SET Options - 1</title><link>http://www.sqlservercentral.com/Forums/Topic1396465-1222-1.aspx</link><description>Good question Ron.  Clear answer and the SQL statements did not distract from the truth you where creating.:cool:</description><pubDate>Fri, 14 Dec 2012 07:24:30 GMT</pubDate><dc:creator>SanDroid</dc:creator></item><item><title>RE: SET Options - 1</title><link>http://www.sqlservercentral.com/Forums/Topic1396465-1222-1.aspx</link><description>Great Question...many thanks</description><pubDate>Fri, 14 Dec 2012 07:19:00 GMT</pubDate><dc:creator>pchirags</dc:creator></item><item><title>RE: SET Options - 1</title><link>http://www.sqlservercentral.com/Forums/Topic1396465-1222-1.aspx</link><description>Great question.But, okay... I give up, how does having an indexed view cause a loss of precision?(I.e. Yep, I see the error.  I don't understand WHY.  :-( )</description><pubDate>Fri, 14 Dec 2012 06:59:24 GMT</pubDate><dc:creator>Rich Weissler</dc:creator></item><item><title>RE: SET Options - 1</title><link>http://www.sqlservercentral.com/Forums/Topic1396465-1222-1.aspx</link><description>Thanks for the easy question to end the week!;-)</description><pubDate>Fri, 14 Dec 2012 06:39:25 GMT</pubDate><dc:creator>Toreador</dc:creator></item><item><title>RE: SET Options - 1</title><link>http://www.sqlservercentral.com/Forums/Topic1396465-1222-1.aspx</link><description>Great question to end the week!  Thanks.</description><pubDate>Fri, 14 Dec 2012 06:28:28 GMT</pubDate><dc:creator>(Bob Brown)  </dc:creator></item><item><title>RE: SET Options - 1</title><link>http://www.sqlservercentral.com/Forums/Topic1396465-1222-1.aspx</link><description>Really nice question.  I even did the research on each option, but somehow missed the line about indexed views.  Looks like I need to brush up on my options!(And I will [i]smack[/i] the first guy who says "Thanks for the easy question to end the week!") ;-)ron</description><pubDate>Fri, 14 Dec 2012 05:50:23 GMT</pubDate><dc:creator>ronmoses</dc:creator></item><item><title>RE: SET Options - 1</title><link>http://www.sqlservercentral.com/Forums/Topic1396465-1222-1.aspx</link><description>Nice question, thanks.</description><pubDate>Fri, 14 Dec 2012 03:12:17 GMT</pubDate><dc:creator>Gazareth</dc:creator></item><item><title>RE: SET Options - 1</title><link>http://www.sqlservercentral.com/Forums/Topic1396465-1222-1.aspx</link><description>Good question Ron.Thanks</description><pubDate>Fri, 14 Dec 2012 02:29:52 GMT</pubDate><dc:creator>Stuart Davies</dc:creator></item><item><title>RE: SET Options - 1</title><link>http://www.sqlservercentral.com/Forums/Topic1396465-1222-1.aspx</link><description>Really interesting question, thanks RonLearned something...</description><pubDate>Fri, 14 Dec 2012 00:30:42 GMT</pubDate><dc:creator>Stewart "Arturius" Campbell</dc:creator></item><item><title>RE: SET Options - 1</title><link>http://www.sqlservercentral.com/Forums/Topic1396465-1222-1.aspx</link><description>Great question to end the week. Had to do some research, but it was worth it.</description><pubDate>Fri, 14 Dec 2012 00:09:44 GMT</pubDate><dc:creator>Koen Verbeeck</dc:creator></item><item><title>RE: SET Options - 1</title><link>http://www.sqlservercentral.com/Forums/Topic1396465-1222-1.aspx</link><description>Another Great question Ron!I was not aware of this limitation and got the question wrong :-)</description><pubDate>Thu, 13 Dec 2012 21:21:29 GMT</pubDate><dc:creator>Lokesh Vij</dc:creator></item><item><title>SET Options - 1</title><link>http://www.sqlservercentral.com/Forums/Topic1396465-1222-1.aspx</link><description>Comments posted to this topic are about the item [B]&lt;A HREF="/questions/SET+Options/94191/"&gt;SET Options - 1&lt;/A&gt;[/B]</description><pubDate>Thu, 13 Dec 2012 20:37:33 GMT</pubDate><dc:creator>bitbucket-25253</dc:creator></item></channel></rss>