Hello Anthony -

On Fri, 27 Aug 1999, Anthony Chan wrote:

> 
> For the second problem, I try to use store procedure for the Oracle session
> database. I create a procedure using the following sql:
> 
> CREATE OR REPLACE PROCEDURE radius.sessiondb (NAME IN VARCHAR2 , NASID IN VARCHAR2,
> PORT IN NUMBER, TIME IN NUMBER, PORTTYPE IN VARCHAR2)
> AS BEGIN
> insert into RADONLINE (USERNAME, NASIDENTIFIER, NASPORT, TIME_STAMP,
> FRAMEDIPADDRESS, NASPORTTYPE) values (NAME, NASID, PORT, TIME, PORTTYPE);
> END;
> 
> I use sqlplus to create the above procedure. Then, I exeute the procedure, at the
> sql prompt:
> 
> EXEC radius.sessiondb ('c200030', '203.63.154.1', 1234, 935668514, 'Async');
> 
> The execute is success. Then, I put the following config into the Radiator config
> file:
> 
> AddQuery        exec radius.sessiondb ('%n', '%N', %{NAS-Port}, %{Timestamp},
> '%{NAS-Port-Type}')
> 
> However, I get the following error message:
> Thu Aug 26 19:55:15 1999: ERR: do failed for 'EXECUTE radius.sessiondb ('c200030',
> '203.63.154.1', 1234, 935668514, 'Async')': ORA-00900: invalid SQL statement (DBD
> ERROR: OCIStmtExecute)
> 

The error shown above is an Oracle error (ORA-00900), but you might try
experimenting with the exec syntax - perhaps remove the parentheses "()"?

AddQuery exec radius.sessiondb '%n', '%N', %{NAS-Port}, %{Timestamp},
'%{NAS-Port-Type}'

> I don't find any further descriptions inside the Radiator reference manual
about  
> it. Can you give me more details about using the store procedures?

Radiator employs the DBD/DBI libraries to avoid database dependencies, so there
is nothing database specific in the code.

BTW - when you get the stored procedures working, please let us know what you
did and we will put an entry in the FAQ describing what is necessary.

thanks

Hugh

--
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, TACACS+, PAM, external, etc etc on Unix, Win95/8,
NT, Rhapsody

===
Archive at http://www.thesite.com.au/~radiator/
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.

Reply via email to