Ad Widget

Collapse

Db2 odbc

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JoohnyO
    Junior Member
    • Jul 2014
    • 25

    #1

    Db2 odbc

    Hello, everyone!

    I'm happy to share some of mine DB2 groundwork.

    It's based on odbc, so you will need an IBM driver.
    Here's a link to it. Get a "IBM Data Server Runtime Client". For my RedHat6 testing server i used "Linux AMD64 and Intel EM64T" version. And yes, its heavy.

    DB2 has quite unordinary setup compare to Sybase or Oracle - This guide helped me a lot.

    I made a python script to tablespace discovery.
    To make it work you need to be sure that db2cli.ini contains "username" and "password" fields.

    To allow 'zabbix' user to use db2instance try:
    Code:
    db2 get dbm cfg
    - find SYSADM_GROUP, its must have something like db2inst group in it. Put 'zabbix' in this group, or just update cfg using:
    Code:
    db2 update dbm cfg using SYSADM_GROUP <group>
    If you get a SQLAllocHandle error - you need to set up an DB2INSTANCE variable:
    Code:
    export DB2INSTANCE=db2inst
    To add remote servers to catalog use this:

    Code:
    catalog tcpip node HOSTALIAS remote 10.10.10.10 server 50000
    and

    Code:
    catalog database HOSTALIAS as HOSTALIAS at node HOSTALIAS
    Hope someone find this helpful.

    GL w DB2.
    Attached Files
Working...