Oracle Stored Procedures for AAA : your suggestinos..

Tiago Pierezan Camargo tcamargo at gmail.com
Wed May 2 15:49:30 CEST 2007


Alan DeKok escreveu:
>> -Can direct replacement of queries work , or a complete module has to be
>> written for calling stored procedure?. The stored procedures are not
>> compatible (i.e. they have completely different inputs and outputs as
>> compared to the SQL queries already present)
> 
>   The rlm_sql code expects a certain output from the queries.  You will
> have to ensure that the procedures (i.e. maybe new ones) return data in
> the appropriate format.
> 
>   Alan DeKok.
> --
>   http://deployingradius.com       - The web site of the book
>   http://deployingradius.com/blog/ - The blog


	It's possible to call your stored procedures from your queries using 
the rlm_sql module. Ex.:

	select my_procedure(a,b,c) from reply_table (...)

	Soon you will discover that you can't perform insert or update commands 
inside a query. As a workaround, declare the procedure as an 
autonomous_transaction.

	create or replace function() return varchar2 is
		(...)
		pragma autonomous_transaction;
	begin
		(...)
	end;

	Still, you have to follow Alan's advice about the returned data. I used 
that approach here without problems.

	Regards,
	Tiago




More information about the Freeradius-Devel mailing list