IC5Notice: We have upgraded developerWorks Community to the latest version of IBM Connections. For more information, read our upgrade FAQ.
Topic
  • 1 reply
  • Latest Post - ‏2013-08-23T17:56:24Z by ThomasBien
labusr
labusr
1 Post

Pinned topic Problem with ODBC database connection

‏2013-08-22T07:23:04Z |

Hi,

I use broker v 7.0.0.2

I try to create connection to ours data base.

In broker work_path/common/profiles i make script to locate odbc.ini file with command

ODBCINI=/var/mqsi/odbc.ini

Next I customized this file and use mqsidb command to set user and password:

mqsisetdbparms brokername -n ORACLEDB -u  user -p password

When I use mqsicvp commands to check connection and broker returned errors:

BIP2393E: Database error: ODBC return code '-1' from data source ''ORACLEDB'' using ODBC driver manager ''libbipodbc.a(odbc.so)''.
The broker received an error when processing a database operation. The ODBC return code was '-1'. See the following messages for information obtained from the database about this error.
Use the following messages to determine the cause of the error. Typical problems are an incorrect data source, or table names. Correct either the database or the broker configuration.
BIP2322E: Database error: SQL State ''IM002''; Native Error Code '0'; Error Text ''[DataDirect][ODBC lib] System information file not found. Please check the ODBCINI environment variable.''.
The error has the following diagnostic information:     SQL State             ''IM002''     SQL Native Error Code '0'     SQL Error Text        ''[DataDirect][ODBC lib] System information file not found. Please check the ODBCINI environment variable.''
This message may be accompanied by other messages describing the effect on the message broker itself.  Use the reason identified in this message with the accompanying messages to determine the cause of the error.

BIP8040E: Unable to connect to the database.
The database cannot be accessed with the specified user Id and password pair.
- Check that the database is running.
 - Check that the database has an adequate number of database connections available for use.
 - On Windows, check that an ODBC connection has been created.
 - On systems that use $ODBCINI, check that the file pointed to by $ODBCINI has been correctly updated.
 - On z/OS check the BIPDSNAO member of the component's dataset, and check the DB2 64bit ODBC driver (DSNAO64C) is in the STEPLIB.
 - Use mqsisetdbparms to set the password to the correct value and try again.

however when i check odbc.ini file is ok: 

$ echo $ODBCINI
/var/mqsi/odbc.ini
$ cat  $ODBCINI
DBC database driver manager initialisation file.                      #
;##########################################################################
;# It is recommended that you take a copy of this file and then edit the  #
;# copy.                                                                  #
;#                                                                        #
;# 1. Complete the 'Mandatory information stanza' section                 #
;# at the end of the file.                                                #
;#                                                                        #
;# 2. For each data source, add the name of the data source into          #
;# the 'List of data sources stanza' section.                             #
;#                                                                        #
;# 3. For each data source, create a stanza in the                        #
;# 'Individual data source stanzas' section.                              #
;##########################################################################
;##########################################
;###### List of data sources stanza #######
;##########################################
[ODBC Data Sources]
ORACLEDB=DataDirect 6.0 ODBC Oracle Wire Protocol
;##########################################################
;########## Individual data source stanzas ################
;##########################################################
;# Oracle stanza
[ORACLEDB]
Driver=/opt/IBM/mqsi/7.0/ODBC/V6.0/lib/UKora24.so
Description=DataDirect 6.0 Oracle Wire Protocol
HostName=host_ip
PortNumber=1521
SID=gazela
CatalogOptions=0
EnableStaticCursorsForLongData=0
ApplicationUsingThreads=1
EnableDescribeParam=1
OptimizePrepare=1
WorkArounds=536870912
ProcedureRetResults=1
ColumnSizeAsCharacter=1
LoginTimeout=0
;##########################################
;###### Mandatory information stanza ######
;##########################################

[ODBC]
;# To turn on ODBC trace set Trace=1
Trace=0
TraceOptions=3
TraceFile=/var/mqm/traceodbctrace.out
TraceDll=/opt/IBM/mqsi/7.0/ODBC/V6.0/lib/odbctrac.so
InstallDir=/opt/IBM/mqsi/7.0/ODBC/V6.0
UseCursorLib=0
IANAAppCodePage=4
UNICODE=UTF-8

I probably make mistakes in same place(s).

Do you have any idea?

Updated on 2013-08-23T07:17:07Z at 2013-08-23T07:17:07Z by labusr
  • ThomasBien
    ThomasBien
    10 Posts

    Re: Problem with ODBC database connection

    ‏2013-08-23T17:56:24Z  

    "System information file not found."

    This is a somewhat generic error indicating that proper ODBC ini file(s) do not exist in the eyes of the Broker.

    - I'm guessing that the ODBCINI variable does exist in the environment that you used when running mqsicvp, based on that echo output.

    - Your odbc.ini file is directly under /var/mqsi. Does the broker/serviceID have access to read/write to this file?

    - Have you installed IE02, the database extender?
    This error message can be triggered if WMB has problems with the 'ODBCSYSINI' variable.
    You may want to make sure that it is correctly filled out (remember, it points to a folder, not a file!).

    http://publib.boulder.ibm.com/infocenter/wmbhelp/v7r0m0/topic/com.ibm.etools.mft.doc/an07235_.htm