(RADIATOR) PLSQL procedure parsing problem

Jan Stanik bjstanik at in.nextra.sk
Thu Nov 18 09:39:02 CST 2004


Hugh Irvine wrote:
> 
> Hello Pavel -
> 
> Thanks for your note.
> 
> Actually we have recently added a new "ConnectionHook" to SqlDb.pm that 
> gets called after each (re)connection to the database - so you may be 
> able to use that to do interesting things.

> 
> regards
> 
> Hugh
> 
> 
> On 16 Nov 2004, at 18:27, Pavel A Crasotin wrote:
> 
>> Hello Jan, Hugh and all.
>>
>> I've just looked at the code of AuthSQL.pm and AuthPLSQL.pm.
>> So the answer to the Jan's question is No, IMHO.
>> There is no way to bind variables at this time, statement should be
>> parsed every time before it's called.

OK.

>>
>> Hugh, as far as I understood Jan the suggestion is to prepare a
>> statement not every time it's called but once right after reconnect to
>> DB. Then Radiator can use prepared statement binding necessary
>> variables.

Yes, that's exactly what I suggest. I think every Radiator user with Oracle
(or MS-SQL maybe) backend has to run into this problem.

>>
>> This feature will cause rewriting of large piece of Radiator code. So
>> Jan dont wait it too early. Am I right, Hugh? :)

>> I'll try to implement this feature in the next version of AuthPLSQL
>> module for the access request first.

It would be great. Thank you Pavel.

>>
>>
>>
>>
>> HI> Hello Jan -
>>
>> HI> Thanks for the clarification.
>>
>> HI> BTW - you do not need to use the AuthBy PLSQL clause for what you are
>> HI> doing - all that is happening is the normal processing of AuthBy 
>> SQL is
>> HI> being used to process the AcctSQLStatement.
>>
>> HI> I have copied this mail to Pavel who is the author of the AuthBy 
>> PLSQL
>> HI> clause to see if he has any suggestions.
>>
>> HI> regards
>>
>> HI> Hugh
>>
>>
>> HI> On 15 Nov 2004, at 20:38, Jan Stanik wrote:
>>
>>>> Hugh Irvine wrote:
>>>>
>>>>> Hello Jan -
>>>>> I'm sorry but I don't understand your question - could you please
>>>>> give me a bit more detail?
>>>>> regards
>>>>
>>>>
>>>> Of course. I use sessiondb.acct stored procedure to write radiator
>>>> account logs into the oracle
>>>> database. When I look into the oracle statistics I see that this
>>>> procedure is parsed every time it is called.
>>>> This slows the database response down.
>>>> Oracle hint is to use bind variables when the procedure is called but
>>>> I don't know how to do it
>>>> in Radiator.
>>>>
>>>>
>>>>> Hugh
>>>>> On 15 Nov 2004, at 01:20, Jan Stanik wrote:
>>>>>
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>>     I have problem with high parsing when radiator calls acct stored
>>>>>> procedure from Oracle db. Can anyone help me to adapt the calling of
>>>>>> this procedure not be parsed every time?
>>>>>>
>>>>>> here is a part of config file:
>>>>>>
>>>>>> <AuthBy PLSQL>
>>>>>>         Identifier SessionDB
>>>>>>         NoDefault
>>>>>>         NoDefault
>>>>>>         DBSource        dbi:Oracle:%{GlobalVar:OraName1}
>>>>>>         DBUsername      %{GlobalVar:OraUser1}
>>>>>>         DBAuth          %{GlobalVar:OraPass1}
>>>>>>         FailureBackoffTime 180
>>>>>>
>>>>>>         AcctSQLStatement begin \
>>>>>>                          sessiondb.acct('%u', '%N',
>>>>>> 0%{NAS-Port},\                     '%{Acct-Session-Id}',
>>>>>> '%{Framed-IP-Address}',\
>>>>>> '%{NAS-Port-Type}','%{Service-Type}',\
>>>>>>
>>>>>> 0%{Acct-Session-Time},'%{Acct-Status-Type}',\
>>>>>>             '%{Class}', 0%{Acct-Input-Octets},\
>>>>>>         0%{Acct-Output-Octets},0%{Acct-Input-Gigawords},\
>>>>>> 0%{Acct-Output-Gigawords}); \
>>>>>>                          end;
>>>>>> </AuthBy>




--
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.


More information about the radiator mailing list