Skip to content

Add DB2 Support #6263

Closed
Closed

Description

@httpdigest

It would be fantastic to have DB2 support in Sequelize. This would allow us to use it in a corporate environment with one of our customers.

What you are doing?

Trying to connect to a IBM DB2 database which is part of a AS/400 IBM i Series.

What do you expect to happen?

I am able to connect to the DB2 database and issue SQL statements.

What is actually happening?

Error: The dialect db2 is not supported. Supported dialects: mariadb, mssql, mysql, postgres, and sqlite.

Dialect: db2
Database version: v9.7.0.1
Sequelize version: 3.23.4

Activity

  1. janmeier commented on Jul 12, 2016

    @janmeier
    Member

    You are welcome to work on this yourself, but this is not something core of maintainers will have the time to do - it requires a substantial amount of work to make sure all tests pass for a new dialect, and adapt existing code to its oddities. Additionally we'd need some way to test it on Travis.

    We would also very much like the person who contributes this work to commit to maintaining it in the future, since none of us have any experience working with db2.

    I'm closing this, not because this will never happen, but because it would require a substantial outside contribution, and we try to keep the number of open issues down. This is not so much a feature request as an "epic" request ;-). I'd you are up to the task, then please ask away and we'd be glad to answer - just know that it's not an easy task, since we cannot accept he contribution before all tests pass.

  2. httpdigest commented on Jul 12, 2016

    @httpdigest
    Author

    Thanks for replying that quick! :) No problem. Staying with Java/Hibernate for the time being, then.

  3. chrisdewar commented on Sep 1, 2016

    @chrisdewar

    Just came across this because I am looking for the same functionality.

    Have you considered pulling out your dialects from the sequelize code and packaging them separately? Then I am free to inject whichever dialect to sequelize I like (rather than selecting from a predefined list), and developers are enabled to create their own dialects...

    Let me know if interested :)

  4. janmeier commented on Sep 1, 2016

    @janmeier
    Member

    @chrisdewar Yes, see #6285 :)

  5. felixfbecker commented on Sep 1, 2016

    @felixfbecker
    Contributor

    @chrisdewar Again, if you want to contribute DB2 support, we would happily accept a PR

  6. aaronbartell commented on Feb 4, 2017

    @aaronbartell

    I am also looking for this capability to connect with DB2 on IBM i (aka iSeries, AS/400). I have a 1-tier scenario where my Node.js will be running in the PASE** environment on the IBM i. I will look into the code to see what changes would be necessary. More just logging interest at this point.

    ** Basically a port of AIX with IBM i as its kernel.

  7. bimalkjha commented on Aug 12, 2018

    @bimalkjha

    https://www.npmjs.com/package/ibm_db has inbuilt support of promises. Do we still require it to be supported by sequelize?

  8. aaronbartell commented on Aug 13, 2018

    @aaronbartell

    Node.js ODBC support for IBM i is in the works which means ibm_db could potentially be used (I haven't tested it yet). Previous to this reality there was a separate idb-connector npm for Node.js to connect to DB2 for i.

    I put my request on hold until the ODBC driver on IBM i can be further tested.

  9. bimalkjha commented on Aug 13, 2018

    @bimalkjha

    @aaronbartell ibm_db is IBM recommended node.js driver for connectivity to Db2 for LUW, Db2 for z/OS, Db2 for i-Series, Db2 on Cloud and Informix database servers from LUW platform. It seems nodejs-idb-connector is for IBM i platform that works for local i-Series server. I would suggest to use ibm_db instead of nodejs-idb-connector. Would request to share your findings using ibm_db. Thanks.

  10. aaronbartell commented on Aug 13, 2018

    @aaronbartell

    @bimalkjha

    I would suggest to use ibm_db instead of nodejs-idb-connector.

    Before last month using ibm_db wasn't possible because there wasn't an ODBC driver that ran on IBM i. Now there is unixODBC, and yes, I will share findings.

  11. bimalkjha commented on Aug 13, 2018

    @bimalkjha

    @aaronbartell I think you can not install ibm_db on IBM i. ibm_db works on Linux, Unix, MacOS, Windows and IBM z platforms only.
    Users are interested to use sequelize ORM on LUW platforms to connect to remote IBM database servers. nodejs-idb-connector is for IBM i platform only. Thanks.

  12. I3uckwheat commented on Oct 4, 2018

    @I3uckwheat

    @aaronbartell any updates on this? We really need this.

  13. bimalkjha commented on Oct 5, 2018

    @bimalkjha
  14. HaithamRashad commented on Aug 28, 2020

    @HaithamRashad
  15. aaronbartell commented on Aug 28, 2020

    @aaronbartell

    I am no longer in the IBM i community and don't have access to an IBM i so I will be unsubscribing from this thread. I wish you the best as you figure this out.

  16. bimalkjha commented on Aug 31, 2020

    @bimalkjha

    @hrmfcis No. https://github.com/ibmdb/sequelize supports only LUW server and we have tested it against LUW server only. It requires another set of mammoth work to update SQLs in sequelize which is compatible for IBMi. But, https://github.com/ibmdb/ibm_db supports IBMi which is internally used by sequelize. I have not tested https://github.com/ibmdb/sequelize against IBMi to know how much it works and what are the gap to support IBMi. It may work upto some extent and may not work. If you want, you can give a try.
    @shilumathai FYI, there is a request to support IBMi for sequelize. Thanks.

  17. markirish commented on Nov 23, 2020

    @markirish
    Contributor

    A while back, I created a port of sequelize to work with IBM i using the ODBC connector. This connector requires no license and is the IBM i OSS Team's preferred method of connecting to Db2 for i from open-source software: https://www.npmjs.com/package/sequelize-ibmi

    Over the last year it has fallen further and further behind the upstream Sequelize branch. I will work on getting it back up to date with the latest commits and versions in master and commit to that package. The eventual end goal is to get it to the main upstream package, with a commitment of support from the IBM i OSS Team to support it for all future Sequelize versions.

  18. HaithamRashad commented on Jan 19, 2021

    @HaithamRashad

    A while back, I created a port of sequelize to work with IBM i using the ODBC connector. This connector requires no license and is the IBM i OSS Team's preferred method of connecting to Db2 for i from open-source software: https://www.npmjs.com/package/sequelize-ibmi

    Over the last year it has fallen further and further behind the upstream Sequelize branch. I will work on getting it back up to date with the latest commits and versions in master and commit to that package. The eventual end goal is to get it to the main upstream package, with a commitment of support from the IBM i OSS Team to support it for all future Sequelize versions.

    @markdirish I have a nodejs application which uses sequelize-ibmi to connect to IBM i database through ODBC, but the application is very slow comparing with the same application which uses the ordinary sequelize to connect to sql database.

    Is there any recommendations to solve this slowness when connecting to IBM i database through ODBC and sequelize-ibmi ?

  19. bimalkjha commented on Jan 19, 2021

    @bimalkjha
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions