473,395 Members | 2,443 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Setting queryopt on a per stored proc basis

How can I set the QUERYOPT value for only a few stored procedures? I have a
large .sql file that is loaded using db2 -td@ -vf file.sql... however I want
to be able to set the QUERYOPT setting to different valus for different
stored procs in that file.. is this possible?

Thanks
Nov 12 '05 #1
1 1612
APAPF wrote:
How can I set the QUERYOPT value for only a few stored procedures? I have
a large .sql file that is loaded using db2 -td@ -vf file.sql... however I
want to be able to set the QUERYOPT setting to different valus for
different stored procs in that file.. is this possible?

Thanks


I don't think that you can do that because QUERYOPT for SQL
stored procedures is specified thru the DB2_SQLROUTINE_PREPOPTS
registry variable.

I would suggest that you split your .sql file into several files,
grouping the stored procedures which should have the same QUERYOPT
setting together. Then you would be able to set DB2_SQLROUTINE_PREPOPTS
before calling the individual .sql files thru the db2 CLP.
Restarting the databaseserver (db2stop/db2start) as suggested in the
DB2 manuals should not be necessary. At least in db2 V8.1.3 on Linux
I was able to set DB2_SQLROUTINE_PREPOPTS without restarting the
databaseserver.

Splitting the files should be fairly easy using an awk or perl
script.

Best regards

Eric
--
IT-Consulting Herber
***********************************************
Download the IFMX Database-Monitor for free at:
http://www.herber-consulting.de/BusyBee
***********************************************
Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Slonjo | last post by:
I don't know if this has been addressed in some other form/forum but we tried what we thought was everything. I apologize if i'm being redundant. We build reports like so when they require...
3
by: Greg D. Moore \(Strider\) | last post by:
Ok, I thought this one would be easy. I have a stored proc: master.dbo.restore_database_foo This is on database server B. Database server A backs up database foo on a daily basis as a...
0
by: Dave Sisk | last post by:
I've created a system or external trigger on an AS/400 file a.k.a DB2 table. (Note this is an external trigger defined with the ADDPFTRG CL command, not a SQL trigger defined with the CREATE...
0
by: mirandacascade | last post by:
Questions toward the bottom of the post. Situation is this: 1) Access 97 2) SQL Server 2000 3) The Access app: a) sets up pass-thru query b) .SQL property of querydef is a string, the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.