orientdb-docs icon indicating copy to clipboard operation
orientdb-docs copied to clipboard

Cannot use teleporter for DB2

Open ayashaswini2 opened this issue 9 years ago • 1 comments

We are using DB2 as our primary database. We want to use teleporter for data syncronisation, data viewing etc.

I had checked jdbc-drivers.json in config directory in orientdb. There is no such configuration for DB2.

In jdbc-drivers.jso for all the other databases there is direct url reference to driver jar files from some sites. But for DB2 there is no such direct links.

So, I added the following script to the bottom of jdbc-drivers.json and added the db2 driver in lib folder in orientdb.

"DB2": {
    "className": "com.ibm.db2.jcc.DB2Driver",
    "url":"/home/yashaswini/orientDB/orientdb-enterprise-2.2.3/lib/db2jcc.jar",
    "version":"4.1.0",
    "format":[
         "jdbc:db2://<HOST>:<PORT>/<DB>"
    ]

    }

Though I have mentioned DB2 as additional database in jdbc-drivers.json, it doesn't show up in drop down of database list in teleporter page in OrientDB studio.

Is there any way I can get DB2 working in teleporter? I would be grateful if anyone can help me in this regard.

Below is the whole script of jdbc-drivers.json after I edited.

{
    "Oracle": {
        "className": "oracle.jdbc.driver.OracleDriver",
        "url": "http://svn.ets.berkeley.edu/nexus/content/repositories/myberkeley/com/oracle/ojdbc7/12.1.0.1/ojdbc7-12.1.0.1.jar",
        "version": "7-12.1.0.1",
        "format": [
            "jdbc:oracle:thin:@<HOST>:<PORT>:<SID>"
        ]
    }, 
    "SQLServer": {
        "className": "com.microsoft.sqlserver.jdbc.SQLServerDriver",
        "url": "http://www.java2s.com/Code/JarDownload/sqljdbc4/sqljdbc4-2.0.jar.zip",
        "version": "4.2.0",
        "format": [
        "jdbc:sqlserver://<HOST>:<PORT>;databaseName=<DB>"
        ]
    },
    "MySQL": {
        "className": "com.mysql.jdbc.Driver",
        "url": "http://central.maven.org/maven2/mysql/mysql-connector-java/5.1.36/mysql-connector-java-5.1.36.jar",
        "version": "5.1.36",
        "format": [
            "jdbc:mysql://<HOST>:<PORT>/<DB>"
        ]
    },
    "PostgreSQL": {
        "className": "org.postgresql.Driver",
        "url": "https://jdbc.postgresql.org/download/postgresql-9.4-1201.jdbc4.jar",
        "version": "9.4-1201",
        "format": [
            "jdbc:postgresql://<HOST>:<PORT>/<DB>"
        ]
    },
    "HyperSQL": {
        "className": "org.hsqldb.jdbc.JDBCDriver",
        "url": "http://central.maven.org/maven2/org/hsqldb/hsqldb/2.3.3/hsqldb-2.3.3.jar",
        "version": "2.3.3",
        "format": [
            "jdbc:hsqldb:hsql://<HOST>:<PORT>",
            "jdbc:hsqldb:file:<filepath>"
        ]
    },
    "DB2": {
    "className": "com.ibm.db2.jcc.DB2Driver",
    "url":"/home/yashaswini/orientDB/orientdb-enterprise-2.2.3/lib/db2jcc.jar",
    "version":"4.1.0",
    "format":[
         "jdbc:db2://<HOST>:<PORT>/<DB>"
    ]

    }
}

ayashaswini2 avatar Jul 04 '16 12:07 ayashaswini2

One of the challenges is that Db2 jar is not available in a repository. However adding db2jcc4.jar and using a file:// to the the configuration path. The DB2 options appears on as a studio option.

Attempting to connect the studio throws a null pointer checking that the jar has downloaded. Again a DB2 (enterprise) option may well be useful as it is the backend to WCS Ecommerce

newgeekorder avatar Nov 09 '17 16:11 newgeekorder