Fwd: (RADIATOR) Bind Variables and Oracle
Mike McCauley
mikem at open.com.au
Thu Nov 22 17:17:27 CST 2001
Hello Mariano,
On Fri, 23 Nov 2001 06:37, Mariano Absatz wrote:
> 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.
Thats correct. More to the point its hard to see a way that allows it to be
configured in a way the average admin can understand whats going on. Your
thoughts?
>
> 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!!!
Thanks, we now have it on our list to do, but not near the top :-(
Cheers.
>
> 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.
--
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.
More information about the radiator
mailing list