[SR-Users] Oracle and package function

Ovidiu Sas osas at voipembedded.com
Mon May 1 18:30:46 CEST 2017


It seems that db_unixodbc always expects a result.
The errors that you are seeing are harmless in your case.

There were some similar issues with the native db_oracle driver but
those are fixed now. However, the db_oracle has a restricted set of
commands that are allowed in raw mode: select, insert, delete and
update.

Regards,
Ovidiu Sas

On Sat, Apr 29, 2017 at 2:28 AM, Diego Nadares <dnadares at gmail.com> wrote:
> Hi list,
>
> I compiled db_unixodbc and sqlops to connect with oracle db.  I have a
> function that has dml inside. Because of this I can't just execute 'select
> pkg.function(a, b) from dual'.
>
> I'm trying with BEGIN / END. The row is inserted but always are log errors:
>
> Apr 29 02:41:57 dwsipm03 /usr/local/sbin/kamailio[7868]: ERROR: db_unixodbc
> [res.c:60]: db_unixodbc_get_columns(): no columns returned from the query
> Apr 29 02:41:57 dwsipm03 /usr/local/sbin/kamailio[7868]: ERROR: db_unixodbc
> [res.c:261]: db_unixodbc_convert_result(): getting column names failed
> Apr 29 02:41:57 dwsipm03 /usr/local/sbin/kamailio[7868]: ERROR: db_unixodbc
> [dbase.c:211]: db_unixodbc_store_result(): failed to convert result
> Apr 29 02:41:57 dwsipm03 /usr/local/sbin/kamailio[7868]: ERROR: <core>
> [db_query.c:188]: db_do_raw_query(): error while storing result
> Apr 29 02:41:57 dwsipm03 /usr/local/sbin/kamailio[7868]: ERROR: sqlops
> [sql_api.c:265]: sql_do_query(): cannot do the query [DECLARE ret CURSOR]
>
> My query:
>
> sql_query("cb","DECLARE ret CURSOR; BEGIN ret :=
> pkg_partitioning.insert(True,'1'); END;");
>
> I tried with other functions and no matter what type returns the oracle
> function; always logs errors. It's like unixodbc is waiting for a result
> with rows.
>
> Any hint?
>
> Thanks in advance,
>
> Diego
>
>
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>



-- 
VoIP Embedded, Inc.
http://www.voipembedded.com



More information about the sr-users mailing list