IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

JDBC Adapter TIMESTAMP(6) WITH LOCAL TIME ZONE columns

  • 1.  JDBC Adapter TIMESTAMP(6) WITH LOCAL TIME ZONE columns

    Posted Wed October 11, 2017 08:45 AM

    Hello forum members

    I have an issue getting a SelectSQL service to work. I am selecting rows from a database for an external application so cannot change column type to TIMESTAMP. The issue is one of the columns I am selecting on is defined as TIMESTAMP(6) WITH LOCAL TIME ZONE. When I include this column in the service I get an error:

    b The database session time zone is not set[/b]

    Is there any way to set the session time zone? I have also tried CustomSQL and DynamicSQL services, but the same issue occurs with those two. I also tried to add the ALTER SESSION SET TIME_ZONE = LOCAL statement before the main query but since the services cannot run multiple queries, this is not possible. If there is no way to set the session time zone, is there an alternative way to get the column data out. I would also like to highlight that since this is an external application database a stored procedure is also out of the question.

    Any help would be appreciated.

    Thanks.

    Yunus Aswat.


    #Adapters-and-E-Standards
    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: JDBC Adapter TIMESTAMP(6) WITH LOCAL TIME ZONE columns

    Posted Wed October 18, 2017 05:47 PM

    you can try to create a stored procedure on the server side, with timezone as a parameter, so you can run SET TIMEZONE first.


    #Adapters-and-E-Standards
    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: JDBC Adapter TIMESTAMP(6) WITH LOCAL TIME ZONE columns

    Posted Thu October 19, 2017 08:04 AM

    Thanks, for the suggestion. I did mention since the database belongs to an external app creating a stored procedure is out of the question.

    I did manage to get around the problem by creating a CustomSQL statement and for the TIMESTAMP(6) WITH LOCAL TIME ZONE column used the to_char function like this:

    to_char(complete_dstamp, ‘YYYY-MM-DD"T"HH24:MI:SS’)

    Not the best way, but due to the limitations of the JDBC Adapter I don’t see another solution.


    #Adapters-and-E-Standards
    #Integration-Server-and-ESB
    #webMethods