Home Dashboard Directory Help
Search

Documentation for the "parse time" settings omits the behavior when the setting is included twice by danholmes


Status: 

Active


1
0
Sign in
to vote
Type: Bug
ID: 781668
Opened: 3/19/2013 6:08:06 AM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

BOL for SET QUOTED_IDENTIFIER has this sentence: "SET QUOTED_IDENTIFIER is set at parse time. Setting at parse time means that if the SET statement is present in the batch or stored procedure, it takes effect, regardless of whether code execution actually reaches that point; and the SET statement takes effect before any statements are executed."

That statement doesn't describe the effect when SET QUOTED_IDENTIFIER exists multiple times in the same batch.

The actual behavior indicates that the last value of the SET is what is sticky to the object(s) created even though the parsing of the text is based on the most recently 'executed' statement.

http://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/6f64258e-9c2d-450a-a57a-9b3db0732100

BOL link for QUOTED_IDENTIFIER
http://msdn.microsoft.com/en-us/library/ms174393(v=sql.90).aspx
Details
Sign in to post a comment.
Posted by koo9 on 8/7/2013 at 9:48 AM
what if some sp need to have QI on and some need to have QI off?
Posted by danholmes on 4/26/2013 at 8:14 AM
thank you. What about this question?

Posted by danholmes on 4/17/2013 at 1:15 PM
"the last setting parsed is used."

So by this you mean that the last setting is *persisted* with the object right? In the example i have given, the first setting is used for parsing until the next setting, but the last setting value is persisted with all objects.
Posted by Microsoft on 4/26/2013 at 7:37 AM
We are no longer planning updates for the SQL Server 2008 Books Online. I made this change in the SQL Server 2008 R2 version. It will update the next time that document set is published. But we don't expect to publish the R2 docs very often. There has to be some significant issue, or the cummulation of a critical mass of moderately important changes. This one doesn't even show up on the importance scale. I also fixed it in the next version, so it will appear in the future docs.
Posted by danholmes on 4/25/2013 at 1:05 PM
I See the BOL for 2012 has been updated. Will the 2008r2/2008/2005 BOL pages be updated as well?
Posted by danholmes on 4/17/2013 at 1:15 PM
"the last setting parsed is used."

So by this you mean that the last setting is *persisted* with the object right? In the example i have given, the first setting is used for parsing until the next setting, but the last setting value is persisted with all objects.
Posted by Microsoft on 4/17/2013 at 10:59 AM
Confirmed the behavior. Added "When multiple conflicting SET statements are present in the batch, the last setting parsed is used." to SQL Server 2008 R2, and SQL Server 2012 Books Online. This will appear as the versions are republished. Thank you for submitting this item.
Posted by danholmes on 3/25/2013 at 8:52 AM
if it matters, i would prefer an answer that corresponds with the observed behavior.
Posted by Microsoft on 3/21/2013 at 3:23 PM
Thank you for submitting this. I'll take a look. Rick Byham.
Sign in to post a workaround.