Fwd: (RADIATOR) Bind Variables and Oracle

Mariano Absatz radiator at lists.com.ar
Thu Nov 22 13:37:06 CST 2001


For the record:

I guess from this message (and another similar one you sent me after a 
similar question), that implementing bound variable managing at a "config 
file" level is not a simple task.

Anyway, if what's misssing is "user request" count mine as one :-) 

Regretfully, I don't have the time (nor the knowledge) to try to do it by 
myself and contribute it... I'm not exactly a Great (and fast) Perl Coder... 
just a fancy hacker from the Perl 4.0.36 no-OO days...

...but I'll cheer for anyone doing this!!!


El 22 Nov 2001 a las 10:09, Mike McCauley escribió:

> Hi Paul,
> 
> Radiator has low level support in the API for using bound variables (see the
> trailing arguments to Radius::SqlDb::do and prepareAndExecute), so you can use
> bound variables in hooks etc.
> 
> However, AuthBy SQL and SessionDatabase SQL do not support bound variables
> with their various queries. That means that there is presently no way to use
> bound variables just by tweaking the AuthBy SQL or SessionDatabase SQL
> parameters. It could only be done through a hook.
> 
> Hope that helps.
> 
> Cheers.
> 
> On Thu, 22 Nov 2001 09:47, Hugh Irvine wrote:
> > Mikey -
> 
> >
> >
> > ----------  Forwarded Message  ----------
> > Subject: (RADIATOR) Bind Variables and Oracle
> > Date: Wed, 21 Nov 2001 17:20:59 -0000
> > From: "Paul" <paul at level9.net>
> > To: <radiator at open.com.au>
> >
> >
> > Hi,
> >
> > Wondering if anyone has had any experience with using bind variables with
> > Radiator / Oracle.
> >
> > I am running Radiator 2.18.2 and Oracle 8.0.5 (both on Solaris) using DBD
> > 1.12 and DBI 1.20.
> >
> > We use a SessionDatabase SQL clause to perform IP vs. CLI writes to an
> > external Oracle database. We have found that the query we are currently
> > using is very inefficient as Oracle has to parse the whole query every time
> > and would like to modify the query to use bind variables as per below:
> >
> > ### WITHOUT BIND VARIABLE
> > $query  = "delete from radius_clid_tbl where " .
> >       "IP_ADDR= '$framedipaddress' or " .
> >       "MSISDN= '$callingstation'";
> > my $sth = $sess_handle->prepareAndExecute($query);
> >
> > ### USING BIND VARIABLE
> > $query  = "delete from radius_clid_tbl where " .
> >       "IP_ADDR= ? or " .
> >       "MSISDN= ? ";
> > my $sth = $sess_handle->prepareAndExecute($query, $framedipaddress,
> > $callingstation);
> >
> > The SessionDb SQL clause currently looks like this:
> >
> > <SessionDatabase SQL>
> >         DBSource dbi:Oracle:
> >         DBUsername user/password at sid
> >         AddQuery
> >         DeleteQuery delete from radius_clid_tbl \
> >                 where (IP_ADDR='%{Framed-IP-Address}' \
> >                 or IP_ADDR='%{Framed-Address}' \
> >                 or MSISDN='%{Calling-Station-Id}')
> >         ClearNasQuery
> >         CountQuery
> > </SessionDatabase SQL>
> >
> > The delete needs to be performed when an access-request is recvd and when a
> > stop record is recvd, so I don't think I can use a hook. Also the DBA's
> > involved won't let me use a stored procedure :-(
> >
> > If anyone has any experience with this, some help would be much appreciated
> >
> > :-)
> >
> > Thanks,
> >
> > Paul
> >
> >
> > ___________________
> >
> > Paul O'Shea
> > Level9 Networks
> > ___________________
> >
> >
> >
> >
> > ===
> > 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.
> >
> > -------------------------------------------------------
> 
> -- 
> Mike McCauley                               mikem at open.com.au
> Open System Consultants Pty. Ltd            Unix, Perl, Motif, C++, WWW
> 24 Bateman St Hampton, VIC 3188 Australia   http://www.open.com.au
> Phone +61 3 9598-0985                       Fax   +61 3 9598-0955
> 
> Radiator: the most portable, flexible and configurable RADIUS server 
> anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald, 
> Platypus, Freeside, TACACS+, PAM, external, Active Directory etc etc 
> on Unix, Win95/8, 2000, NT, MacOS 9, MacOS X
> ===
> 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.


--
Mariano Absatz
El Baby
----------------------------------------------------------
Okay, okay, I take it back! Unfuck you!


===
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