Re: Stored proceudre SQL reuse ODP?
- From: Kent Milligan <kmill@xxxxxxxxxxxxxx>
- Date: Wed, 17 May 2006 16:53:47 -0500
I didn't know you were calling from Net.Data, so that's more difficult.
Maybe you could call a routing procedure and then have it call the stored procedure instance for that customer and have a separate stored procedure for each customer.
If the SQL statements in the procedure are being handled by SQE, then it's less of an issue.
I'd really suggest attending the iSeries SQL Performance workshop in July to understand the performance implications:
ibm.com/servers/eserver/iseries/service/igs/db2performance.html
David Wilson wrote:
Thanks Kent. I did call IBM support earlier today and sent them some comm traces and DB monitor output.
Can you elaborate on the "one connection per customer"? How would I force that to happen?
The stored procs are called remotely from a Net.Data macro on a Web server (partition) to the remote database on another partition.
Many thanks,
David Wilson
"Kent Milligan" <kmill@xxxxxxxxxxxxxx> wrote in message news:446644e7$1@xxxxxxxxxxxxxxxxxxxxSounds like a defect that should be reported to IBM Support.
I'd probably also suggest having one connection per customer in the future to get the best performance.
David Wilson wrote:Sorry for my misspelling - s/b Stored procedure SQL reuse ODP?--
"David Wilson" <david_wilson@xxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:44636ef1$0$8839$afc38c87@...I have a stored procedure written in ILE RPG/free that uses SQL to select data. A cursor to the result set is returned by the stored proc. Within the procecdure, based on a parameter passed in, the library list is changed prior to the SQL execution. Our database services multiple customers by implementing a common database schema in separate libraries (collections), by customer. After "pointing" to the set of data for the current requester (customer), I then execute the SQL satement.
What I am experiencing is that even though I am pointing to files for customer "A", a previous ODP, it appears, for customer "B" (from a previous stored proc call) is being used.
All of this is happening in remote server jobs (QRWTSRVR) in QUSRWRK - as we are calling the stored proc from a Web server LPAR to our production database LPAR.
I hope this is clear. My question is: Is there any way to keep the previously opened ODP from being used in this stored procedure?
(Note: I am not using PREPARED SQL statements)
Thanks,
David
Kent Milligan
ISV Enablement - System i
kmill@xxxxxxxxxxxxxxxx (spam trick) GO HAWKEYES!!
(opinions stated are not necessarily those of my employer)ibm.com/iseires/db2
--
Kent Milligan
ISV Enablement - System i
kmill@xxxxxxxxxxxxxxxx (spam trick) GO HAWKEYES!!
>>> ibm.com/iseires/db2
(opinions stated are not necessarily those of my employer)
.
- References:
- Re: Stored proceudre SQL reuse ODP?
- From: Kent Milligan
- Re: Stored proceudre SQL reuse ODP?
- Prev by Date: Re: copy file to ifs unix
- Next by Date: Re: AS400 and OLEDB - SQL Statement not Returning Data
- Previous by thread: Re: Stored proceudre SQL reuse ODP?
- Next by thread: Special symbols on 5250 screens
- Index(es):
Relevant Pages
|