I am trying to connect my nagios server to an AS/400 DB2 database.
I am using the unixODBC package, But i got stuck when i try to connect to the as/400 which seems to be an driver issue.
I am using this tutorial:
http://wiki.skytech.dk/index.php/Using_ ... _and_AS400
This is the command i am using:
Code: Select all
[root@localhost iSeriesAccess]# isql
**********************************************
* unixODBC - isql *
**********************************************
* Syntax *
* *
* isql DSN [UID [PWD]] [options] *
* *
* Options *
* *
* -b batch.(no prompting etc) *
* -dx delimit columns with x *
* -x0xXX delimit columns with XX, where *
* x is in hex, ie 0x09 is tab *
* -w wrap results in an HTML table *
* -c column names on first row. *
* (only used when -d) *
* -mn limit column display width to n *
* -v verbose. *
* -lx set locale to x *
* -q wrap char fields in dquotes *
* -3 Use ODBC 3 calls *
* -n Use new line processing *
* -e Use SQLExecDirect not Prepare *
* -k Use SQLDriverConnect *
* --version version *
* *
* Commands *
* *
* help - list tables *
* help table - list columns in table *
* help help - list all help options *
* *
* Examples *
* *
* isql WebDB MyID MyPWD -w < My.sql *
* *
* Each line in My.sql must contain *
* exactly 1 SQL command except for the *
* last line which must be blank (unless *
* -n option specified). *
* *
* Please visit; *
* *
* http://www.unixodbc.org *
* nick@lurcher.org *
* pharvey@codebydesign.com *
**********************************************
[root@localhost iSeriesAccess]# isql AS400 nagios nagios -v
[IM002][unixODBC][Driver Manager]Data source name not found, and no default driver specified
[ISQL]ERROR: Could not SQLConnect
this is my odbcinst.ini:
Code: Select all
[AS400]
Description=IBM i Access for Linux ODBC Driver
Driver=/opt/ibm/iSeriesAccess/lib/libcwbodbc.so
Setup=/opt/ibm/iSeriesAccess/lib/libcwbodbcs.so
Driver64=/opt/ibm/iSeriesAccess/lib64/libcwbodbc.so
Setup64=/opt/ibm/iSeriesAccess/lib64/libcwbodbcs.so
Threading=0
DontDLClose=1
UsageCount=1
[AS400_64]
Description=IBM i Access for Linux 64-bit ODBC Driver
Driver=/opt/ibm/iSeriesAccess/lib64/libcwbodbc.so
Setup=/opt/ibm/iSeriesAccess/lib64/libcwbodbcs.so
Threading=0
DontDLClose=1
UsageCount=1
Is there anyone around with some unixODBC experience?
Kind regards,
Martijn