DB2 & Java Frustration -HELP!

Ask a Question related to IBM DB2, Design and Development.

  1. #1

    Default DB2 & Java Frustration -HELP!

    Greetings,
    I have cross posted this as it is a frustration we are having with the use
    of DB2 in Java applications.

    We have had DB2 installed now for a few months and we have been trying to
    develop stored procedures etc.

    We are getting very frustrated with a few things.

    1. Documentation seems to be all over the place. We look on the web at the
    documentation and it tends to "elude" to things, but the fine details are
    either spread throughout other parts of the documentation or missing. Is
    this a frustration everybody else finds as well or just me not looking in
    the right places? I cant seem to find any reasonable books on this stuff
    either.

    2. DB2 appears to act quite differently when calling stored procedures.
    After having build a large number of stored procs we are now discovering
    that we cant create a scrollable result sets in java so that we can step
    through and do things like find how many records there are in the RS etc.
    Also finding that the when we call a stored proc many of the errors that are
    returned at the command line are not returned in via JDBC to the
    application. Is it just that JDBC drivers for DB2 are immature or are there
    tricks somewhere that we dont know about (we have looked at the examples and
    followed them closely, though they do not go through an example of
    scrollable Result sets in java).

    3. Are we supposed to be usind the IBM JDK ?? Will that make life easier, or
    is there little difference between this and Sun JDK

    4. Are the IBM DB2 courses worth doing, are we just suffereing from post MS
    SQL, POSTGRESQL blues?? and need to start thinking about things a little
    differently.

    We have been trying to move our development from Postgres (full working
    application using postgresql database and user defined functions) to DB2 for
    the last 2 months and we are getting more and more frustrated with the way
    that things seem to work (our frustration is particularly with the
    documentation and how calling stored procs from within a java application
    seems to be limited by the JDBC driver when compared to calling straight sql
    wrt. recordsets and other functions you can call on the data).

    There are 2 of us working on this DB2 project together and we both have
    large amounts of experience with databases including MS SQL, Postgresql,
    Mysql, Sybase, Oracle. Neither of us have used db2 before and we are finding
    it most frustrating !!

    Any help, suggestions, others experiences would be appreciated.

    Using;

    Db2 V8.1 (all service packs installed) running on Redhat 8.0
    Sun JDK
    Netbeans IDE.
    JDBC type 4 drivers as supplied by IBM in latest fixpack.

    Regards
    Ben Stewart.
    *thud*


    sdfg Guest

  2. Similar Questions and Discussions

    1. Severe Frustration!!!
      OK, Please excuse the slightly angered tone of this post but I'm in serious trouble and overwhelmed by frustration. I work for a company...
    2. backup frustration
      Greetings. I am trying to restore a copy of our production database onto a development server. I have been backing up my database using the...
    3. Cache Frustration!
      I'm having a big problem with cache. I have 3 radio buttons that each show a differnt div with a form on it on an asp page. When submitted whatever...
    4. Frustration.
      I bought an e machine in March of this year with Windows XP loaded and a trial version of McAfee Internet Security loaded too. I then bought a...
    5. XP Networking frustration
      Per SW vendor request I had to move a shared folder from a 2000 Server to an XP Pro share on the local domain. Share was setup with full control...
  3. #2

    Default Re: DB2 & Java Frustration -HELP!

    I can't comment on every point but I know that frustrating feeling with
    DB2 well, too.

    "sdfg" <benstewart74@nospam.yahoo.com.au> schrieb im Newsbeitrag
    news:iUi7b.90893$bo1.3709@news-server.bigpond.net.au...
    > 2. DB2 appears to act quite differently when calling stored procedures.
    > After having build a large number of stored procs we are now discovering
    > that we cant create a scrollable result sets in java so that we can step
    > through and do things like find how many records there are in the RS
    etc.
    > Also finding that the when we call a stored proc many of the errors that
    are
    > returned at the command line are not returned in via JDBC to the
    > application. Is it just that JDBC drivers for DB2 are immature or are
    there
    > tricks somewhere that we dont know about (we have looked at the examples
    and
    > followed them closely, though they do not go through an example of
    > scrollable Result sets in java).
    The JDBC driver is an especial annoyance because it contains native parts
    (and is thus not very mobile with regard to platforms and needed external
    installation programs) and we got into trouble when trying to connect to a
    DB2 on an AS400 and a DB2 on a Win machine at the same time. Awful!
    > 3. Are we supposed to be usind the IBM JDK ?? Will that make life
    easier, or
    > is there little difference between this and Sun JDK
    I doubt that this will make life easier for you. After all, JDBC drivers
    are supposed to work with any JDK.
    > 4. Are the IBM DB2 courses worth doing, are we just suffereing from post
    MS
    > SQL, POSTGRESQL blues?? and need to start thinking about things a
    little
    > differently.
    I find MS SQL far more convenient than DB2, they even have a pure Java
    JDBC driver. (Quality is debatable but at least it's portable.)
    > We have been trying to move our development from Postgres (full working
    > application using postgresql database and user defined functions) to DB2
    for
    > the last 2 months and we are getting more and more frustrated with the
    way
    > that things seem to work (our frustration is particularly with the
    > documentation and how calling stored procs from within a java
    application
    > seems to be limited by the JDBC driver when compared to calling straight
    sql
    > wrt. recordsets and other functions you can call on the data).
    IMHO part of your frustration stems from the fact that you are using
    different relational DB's - they're less compatible than one might think.
    The other part comes from DB2 beeing a bit - err - complicated. I've
    spend quite some time on IBM web sites in search for drivers and doc,
    too...

    Good luck!

    robert

    Robert Klemme Guest

  4. #3

    Default Re: DB2 & Java Frustration -HELP!

    Full message text is not returned when using SQLException.getMessage()
    By default, the DB2BaseDataSource.retrieveMessagesFromServerOnGetM essage
    property is disabled. If you enable this property, all calls to the standard
    JDBC SQLException.getMessage() invoke a server-side stored procedure, which
    retrieves the readable message text for the error. By default, the full
    message text is not returned to the client when a server-side error occurs.

    You can use the proprietary method DB2Sqlca.getMessage() to retrieve the
    fully formatted message text. A call to the SQLException.getMessage() method
    will start a unit of work only if retrieveMessagesFromServerOnGetMessage is
    enabled. A call to the DB2Sqlca.getMessage() method results in a stored
    procedure call, which starts a unit of work. Prior to FixPak 1, the
    DB2Sqlca.getMessage() method may throw an exception.

    PM


    PM \(pm3iinc-nospam\) Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139