?
Solved

Is QUOTED_IDENTIFIER a database wide setting?

Posted on 2008-10-08
2
Medium Priority
?
430 Views
Last Modified: 2008-10-16
Hello Experts. I noticed that I have to set QUOTED_IDENTIFIER=ON in my stored procedure in order to query from an XML datatype (to get the elements out). Is this QUOTED_IDENTIFIER a setting at the sproc level? That is, if I set QUOTED_IDENTIFIER=ON in one sproc, will it turn it on in the other sprocs within the same database? (I only want this setting in my sproc only and no others) Sorry for the dumb question!
0
Comment
Question by:trpnbillie
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 35

Accepted Solution

by:
David Todd earned 375 total points
ID: 22675429
Hi,

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.

from ... http://technet.microsoft.com/en-us/library/aa259228(SQL.80).aspx

or
When executed inside a stored procedure, the setting of SET QUOTED_IDENTIFIER is not changed.

from
http://technet.microsoft.com/en-us/library/ms174393(SQL.90).aspx

HTH
  David
0
 

Author Comment

by:trpnbillie
ID: 22687915
Thanks for your response! I think this

When executed inside a stored procedure, the setting of SET QUOTED_IDENTIFIER is not changed.

answers my question.

If at the top of my stored procedure "ProcA"  e.g.

SET QUOTED_IDENTIFIER = ON
GO
CREATE ProcA

That ON setting will not be enforced when other sprocs (ProcB, ProcC, ProcD) are executed? (unless they too have SET QUOTED_IDENTIFIER = ON). Is that right? THank you!!
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

So every once in a while at work I am asked to export data from one table and insert it into another on a different server.  I hate doing this.  There's so many different tables and data types.  Some column data needs quoted and some doesn't.  What …
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question