MSSQL using unixodbc and truncation of characters
Franks Andy (RLZ) IT Systems Engineer
Andy.Franks at sath.nhs.uk
Thu Jun 13 16:34:21 CEST 2013
Hi Aaran,
The Sybase driver works for a simple "select 123456", but then any
real value gives, .e.g :
rlm_sql (sql_test_mssql): Executing query: 'Select NetworkCardID from
Audit_NetworkCard where macaddress='9C:B7:0D:84:0D:09''
Sybase Server message:
number(208) severity(16) state(1) line(1)
Invalid object name 'Audit_NetworkCard'.
rlm_sql_sybase(sql_select_query): Unexpected result type from query
rlm_sql (sql_test_mssql): Database query error ''
This is because it doesn't properly set the database to the one asked
for :
(by the way is there a nice way to get shot of all these ansi escape
codes from the radius.log? It looks nice in -X mode, but not great
back-end)
rlm_sql (sql_test_mssql): Creating new attribute
sql_test_mssql-SQL-Group
rlm_sql (sql_test_mssql): Couldn't find configuration for accounting,
will return NOOP for calls from this section^[[$
^[[1mrlm_sql (sql_test_mssql): Couldn't find configuration for
post-auth, will return NOOP for calls from this section^[[0m
^[[1mrlm_sql (sql_test_mssql): Driver rlm_sql_sybase (module
rlm_sql_sybase) loaded and linked^[[0m
^[[1mrlm_sql (sql_test_mssql): Attempting to connect to database
"SATHSupport"^[[0m
rlm_sql (sql_test_mssql): Initialising connection pool
^[[1mrlm_sql (sql_test_mssql): Opening additional connection (0)^[[0m
^[[31mSybase Server message: ^[[0m
^[[31mnumber(5701) severity(0) state(2) line(1) ^[[0m
^[[31mChanged database context to 'master'. ^[[0m
^[[31mSybase Server message: ^[[0m
^[[31mnumber(5703) severity(0) state(1) line(1) ^[[0m
^[[31mChanged language setting to us_english. ^[[0m
^[[1mrlm_sql (sql_test_mssql): Opening additional connection (1)^[[0m
^[[31mSybase Server message: ^[[0m
^[[31mnumber(5701) severity(0) state(2) line(1) ^[[0m
^[[31mChanged database context to 'master'. ^[[0m
^[[31mSybase Server message: ^[[0m
^[[31mnumber(5703) severity(0) state(1) line(1) ^[[0m
^[[31mChanged language setting to us_english. ^[[0m
...
So I need to use an explicit sql call to set the database early on, but
otherwise it works without too much hassle, and no truncation of
returned value (!)
Now, if only I could get the unixodbc rlm module working. You mentioned
a linking problem - any ideas on progressing debug with that?
Thanks VERY much, this list is great.
Andy
More information about the Freeradius-Users
mailing list