Hello Friends,
I am trying to connect oracle using dsn for this i have installed oracle 10 xe in my
ubuntu 10.04. after that i have edited two files /etc/odbc.ini and /etc/odbcinst.ini as follows
/etc/odbcinst.ini
[OracleODBC-10g]
Description = Oracle ODBC driver for Oracle 10g
Driver = /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libsqora.so.10.1
FileUsage = 1
Driver Logging = 7
/etc/odbc.ini
[simple]
Driver = OracleODBC-10g
DSN=XE
Database=192.168.1.32:1521/XE
UserID=SYSTEM
Password=12345
sanitysql => select 1
idlecheck => 15
pooling => yes
limit => 720000
connect_timeout => 10
negative_connection_cache => 30
net_buffer_length=1000000
max_allowed_packet=1000000000
and my res_odbc.conf look like this
[simple]
enabled => yes
DSN => simple
UserID => SYSTEM
Password => 12345
pre-connect => yes
sanitysql => select 1
idlecheck => 15
pooling => yes
limit => 3600
connect_timeout => 10
negative_connection_cache => 30
and my cdr_odbc.conf
[global]
dsn=simple
username=SYSTEM
password=12345
loguniqueid=yes
dispositionstring=yes
after that i have run three export command like wise
export LD_LIBRARY_PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib
export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
export ORACLE_SID=XE
and after performing these steps i checked my odbc coonection from this command
isql -v simple
±--------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
±--------------------------------------+
and after taking all these steps when i am trying to connect my ivr with this dsn i found this debug
information in asterisk CLI
[Jun 18 18:28:56] NOTICE[3299][C-00000000]: res_odbc.c:1524 odbc_obj_connect: Re-connecting simple
[Jun 18 18:28:56] NOTICE[3299][C-00000000]: res_odbc.c:1559 odbc_obj_connect: res_odbc: Connected to simple [simple]
[Jun 18 18:28:56] WARNING[3299][C-00000000]: res_odbc.c:608 ast_odbc_direct_execute: SQL Execute error! Verifying connection to simple [simple]…
[Jun 18 18:28:56] WARNING[3299][C-00000000]: res_odbc.c:761 ast_odbc_sanity_check: Connection is down attempting to reconnect…
[Jun 18 18:28:56] NOTICE[3299][C-00000000]: res_odbc.c:1527 odbc_obj_connect: Connecting simple
[Jun 18 18:28:56] NOTICE[3299][C-00000000]: res_odbc.c:1559 odbc_obj_connect: res_odbc: Connected to simple [simple]
[Jun 18 18:28:56] WARNING[3299][C-00000000]: res_odbc.c:761 ast_odbc_sanity_check: Connection is down attempting to reconnect…
[Jun 18 18:28:56] NOTICE[3299][C-00000000]: res_odbc.c:1527 odbc_obj_connect: Connecting simple
[Jun 18 18:28:56] NOTICE[3299][C-00000000]: res_odbc.c:1559 odbc_obj_connect: res_odbc: Connected to simple [simple]
[Jun 18 18:28:56] ERROR[3299][C-00000000]: cdr_odbc.c:162 odbc_log: CDR direct execute failed
please help me how can i resolve this error i have spend two day’s please let me know
how to resolve this error and one thing which i never told as earlier is that i am using
asterisk-11.4.0.