Solved

Is QUOTED_IDENTIFIER a database wide setting?

Posted on 2008-10-08
2
417 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
2 Comments
 
LVL 35

Accepted Solution

by:
David Todd earned 125 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

I've encountered valid database schemas that do not have a primary key.  For example, I use LogParser from Microsoft to push IIS logs into a SQL database table for processing and analysis.  However, occasionally due to user error or a scheduled task…
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 seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

758 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now