[SR-Users] Oracle and package function

Diego Nadares dnadares at gmail.com
Wed May 3 16:46:31 CEST 2017


Thanks Ovidiu. I commented those lines in unixodbc just to avoid errors. I
will modifying the code to work with functions eventually.

Thanks!

Diego

2017-05-01 13:30 GMT-03:00 Ovidiu Sas <osas at voipembedded.com>:

> 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
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20170503/45fbd53b/attachment.html>


More information about the sr-users mailing list