Hi all,

I’m trying to configure my Kamailio  server in order to use Oracle (v11g) DB.

So, I have defined the DBURL, in the kamailio.cfg file:

 

DBURL "oracle://openser:openserrw@<Oracle server IP Address>:1521/openserdb"

 

Where:

·         openser/openserrw: is the user/pwd read/write user of the kamailio oracle schema;

 

Could someone, please, tell me if the dburl is defined in the right format and if it isn’t provide me the right one?

 

I would just add that using the kamailio_orasel tool complied with the same oracle instant client sdk, I’m able to contact the oracle instance executing query and so on…but, this tool use the TNSNAME defined in the $TNS_ADMIN/tnsnames.ora oracle config file like below:

 

LAB =

  (DESCRIPTION =

    (ADDRESS_LIST =

      (ADDRESS = (PROTOCOL = TCP)(HOST = < Oracle server IP Address>)(PORT = 1521))

    )

    (CONNECT_DATA =

      (SERVICE_NAME = openserdb)

    )

  )

 

The command used to query the oracle DB successfully is:

./kamailio_orasel openser/openserrw@LAB  -e "select * from subscriber;"

 

 

Thanks in advance.

Kind regards,

laura



On Thu, Apr 21, 2011 at 2:19 PM, laura testi <lau.testi@gmail.com> wrote:
Hello,
 
>Oracle module was developed some time ago, probably using an older version of oracle server and library. You should add some >debug messages inside function get_rows() from modules_k/db_oracle/res.c in order to see exactly what function threw the error. >Then you may find more hints searching on the web for that function name and error message.

thanks for your suggestion, Daniel.
I added debug messages inside the db_oracle/res.c module and I was able to find the function ends in error.
This function is:

 

OCIStmtFetch2(_c, con->errhp, 1, OCI_FETCH_LAST, 0, OCI_DEFAULT);

 

where:

 

OCIStmt* _c;

ora_con_t* con;

 
I have also tried to compile the module using both the instantclient-sdk-11.2.0.2 or oracle-instantclient-basic-10.2.0.3-1, but receiving the same error.
 
Any idea?
 
Thanks and regards,
laura 
 
On Wed, Apr 20, 2011 at 11:32 PM, Daniel-Constantin Mierla <miconda@gmail.com> wrote:
Hello,


On 4/20/11 6:52 PM, laura testi wrote:

Hi all,

we are trying to setup a Kamailio  as a SIP/SIMPLE presence server for chat based on the guide published in SIP SIMPLE Presence Made Simple with Kamailio 3.1.x on the site: http://kb.asipto.com/kamailio:presence:k31-made-simple.

 

The OS we are using is Linux RHEL 5.6 x64 and ORACLE 11g as Database.

 

So I have compiled the db_oracle module using instantclient-sdk-11.2.0.2 but when I start kamailio I receive the following errors:

 

 Apr 19 23:12:07 localhost /opt/openkore/sbin/kamailio[10394]: INFO: db_oracle [ora_con.c:132]: server version is Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options

Apr 19 23:12:08 localhost /opt/openkore/sbin/kamailio[10394]: ERROR: db_oracle [res.c:423]: driver: ORA-24330: internal OCI error

Apr 19 23:12:08 localhost /opt/openkore/sbin/kamailio[10394]: ERROR: db_oracle [res.c:475]: error while converting rows

Apr 19 23:12:08 localhost /opt/openkore/sbin/kamailio[10394]: ERROR: <core> [db_query.c:108]: error while storing result

Apr 19 23:12:08 localhost /opt/openkore/sbin/kamailio[10394]: ERROR: <core> [db.c:366]: error in db_query

Apr 19 23:12:08 localhost /opt/openkore/sbin/kamailio[10394]: ERROR: <core> [db.c:405]: querying version for table presentity

Apr 19 23:12:08 localhost /opt/openkore/sbin/kamailio[10394]: ERROR: presence [presence.c:300]: error during table version check

Apr 19 23:12:08 localhost /opt/openkore/sbin/kamailio[10394]: ERROR: <core> [sr_module.c:875]: init_mod(): Error while initializing module presence (/opt/openkore/lib64/kamailio/modules_k/presence.so)

Apr 19 23:12:10 localhost /opt/openkore/sbin/kamailio[10394]: ERROR: db_oracle [ora_con.c:173]: driver: ORA-03127: no new operations allowed until the active operation ends

Apr 19 23:12:11 localhost /opt/openkore/sbin/kamailio[10394]: INFO: db_oracle [db_oracle.c:91]: Oracle terminate

 

Is it a known bug of db_oracle module?

Could you please help me to solve this problem?

"internal OCI error" is very intuitive coming from Oracle, moreover searching google for this ORA error says the action to do is "Contact Oracle Support" :-)

 
 

Cheers,
Daniel
-- 
Daniel-Constantin Mierla
http://www.asipto.com