(RADIATOR) AddressAllocator and SQL

Hugh Irvine hugh at open.com.au
Thu Dec 18 17:26:11 CST 2003


Hello Vangelis -

As you only need the first available address, you only need one row 
from the query.

It is much more efficient to limit the results of the query.

regards

Hugh


On 19/12/2003, at 12:30 AM, Vangelis Kyriakakis wrote:

> Hello,
>
> Ok. I found the correct syntax for the Sybase, but should I always 
> limit the reply of the query to only one row?
> I thought that the allocator gets a number of rows from the FindQuery 
> and uses the first available address it can find.
>
>          Regards
>                Vangelis
>
>
> Hugh Irvine wrote:
>
>>
>> Hello Vangelis -
>>
>> This is from the Radiator 3.7.1 reference manual ("doc/ref.html"):
>>
>>
>> 6.56.5 FindQuery
>>
>> This optional parameter allows you to define a custom SQL query to 
>> find an available address. Defaults to
>>
>> select TIME_STAMP, YIADDR, SUBNETMASK, DNSSERVER from RADPOOL
>> where POOL='%0' and STATE=0 order by TIME_STAMP
>>
>> %0 is replaced by the pool hint. %1 is replaced by the username.
>>
>>  Hint : You can get a substantial speedup during address allocation 
>> with mysql by adding `limit 1'' to the end of the FindQuery.
>>
>>
>> You should check your Sybase documentation to ascertain what the 
>> equivalent syntax is.
>>
>> A quick Google search on "sybase select limit" turns up quite a few 
>> useful hits.
>>
>> regards
>>
>> Hugh
>>
>>
>> On 17/12/2003, at 8:26 PM, Vangelis Kyriakakis wrote:
>>
>>> Hello,
>>>
>>>      we are trying to use AddressAllocator with Microsoft SQL and 
>>> Sybase.
>>>      In both situations the default FindQuery
>>>
>>> select TIME_STAMP,YIADDR,SUBNETMASK,DNSSERVER from RADPOOL where 
>>> POOL='%0' and STATE=0 order by TIME_STAMP
>>>
>>>       tries to allocate a lot of addresses and finally returns an 
>>> error "Too many simultaneous address requests"
>>>
>>>      In Microsoft SQL I can use the following query:
>>>
>>> select top 1 TIME_STAMP,YIADDR,SUBNETMASK,DNSSERVER from RADPOOL 
>>> where POOL='%0' and STATE=0 order by TIME_STAMP
>>>
>>>      and it works fine, trying once to allocate an IP. But this 
>>> query doesn't work with Sybase. What can I use instead of this? Do I 
>>> do something wrong with default query?
>>>
>>>                Regards
>>>                      Vangelis
>>>
>>>
>>> ===
>>> 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.
>>>
>>>
>>
>> NB: have you included a copy of your configuration file (no secrets),
>> together with a trace 4 debug showing what is happening?
>>
>
>

NB: have you included a copy of your configuration file (no secrets),
together with a trace 4 debug showing what is happening?

-- 
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. Available on *NIX, *BSD, Windows, MacOS X.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.
-
CATool: Private Certificate Authority for Unix and Unix-like systems.

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