Hi Kevin,
The issue here is MSDAORA is 'not' binding parameters when calling Oracle
objects. We have experienced this using ADO 2.7, win2000 (sp4), Oracle
9.2.0.4.0. This increases the amount of parsing done and use of the global
sql area, reducing the database performance significantly.
Take a look at the following SQL:
SQL>select sql_text from v$sql where sql_text like 'begin TEST%';
and the results:
SQL_TEXT
--------------------------------------------------
begin TEST_BINDVARIABLE(378,182,:V00003); end;
begin TEST_BINDVARIABLE(678,882,:V00003); end;
begin TEST_BINDVARIABLE(1,2,:V00003); end;
Notice how the first and second input parameters has been inlined as apposed
to:
begin TEST_BINDVARIABLE(:V00001,:V00002,:V00003); end;
Obviously, this is filling up my shared_pool very fast. Now the questions
is: Why isn't everything being parameterized/binded? Also, all my procs are
exhibiting similar behavior, mostly with database variables of the type
NUMBER.
Any Ideas?
Below is the stored procedure code getting called:
create or replace procedure Test_bindvariable
( iOrderNo IN NUMBER
, iOrderItemNo IN NUMBER
, irefnumber OUT VARCHAR2
) IS
lv_count number;
BEGIN
SELECT count(*) into lv_count FROM TABLE_LJ
WHERE OrderNo = iOrderNo
AND OrderItemNo = iOrderItemNo;
irefnumber := '12345678';
END Test_bindvariable;
Hope this helps, Thanks, kp
"Kevin Yu [MSFT]" <v-kevy.RemoveThis@online.microsoft.com> wrote in message
news:vwU0PS0DFHA.2876@TK2MSFTNGXA01.phx.gbl...
> Hi kp,
>
> First of all, I would like to confirm my understanding of your issue. I'm
> not quite sure what has occurred from your description. Could you let me
> know what kind of entry is created when the SP is called?
>
> It would also be helpful if you could post your SP here, with both actual
> results and expected results. Thank you!
>
> Kevin Yu
> =======
> "This posting is provided "AS IS" with no warranties, and confers no
> rights."
><!-- ~MESSAGE_AFTER~ -->
>> Stay informed about: Bind Variables ADO - Oracle