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
  • 1.  JDBC CustomSQL, DynamicSQL - Schema

    Posted Tue March 13, 2007 09:20 PM

    I’m using WM 6.1 and SQL SERVER 2000 and have several JDBC customSQL adapter services that I’ve created.

    The problem is that I can’t run them without the fully qualified schema name in the actual SQL statement:

    For example:
    SELECT IMITM FROM TESTDTA.F4102 (WORKS)
    SELECT IMITM FROM F4102 (DOES NOT WORK) (Error: Invalid object)

    Question: How do you setup the JDBC adapter so that you eliminate the need to have the fully qualified schema name?

    Environment will require developing in test environment then promote to production database. There are also multiple schemas per database.

    TESTDTA (Development Business Data)
    TESTCTL (Development control tables)

    CRPDTA (Test Business Data)
    CRPCTL ( Test control tables)

    PRODDTA (Production Business Data)
    PRODCTL (Production control tables)

    Tried using currentSchema=TESTDTA but that didn’t seem to do anything.

    This is a very important issue for the client and if I can’t solve this issue the client may stop using webMethods.

    Any help or examples would be greatly appreciated.


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


  • 2.  RE: JDBC CustomSQL, DynamicSQL - Schema

    Posted Wed March 14, 2007 06:32 PM

    you have to use Dynamic SQL and retrieve “Schema” value at runtime by using config files.

    Before invoking the adapter service retrieve the “Schema” value from config file at run time .

    Your dynamic SQL will look like below and value of “Schema” will be replaced at run time

    SELECT IMITM FROM ${Schema}.F4102


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


  • 3.  RE: JDBC CustomSQL, DynamicSQL - Schema

    Posted Wed March 14, 2007 07:01 PM

    Thanks sai for your response. I can see how this would work for Dynamic SQL but how would you get the CustomSQL services to work?

    Also, there is suppose to be a property on the JDBC Adapter currentSchema=YourCurrentSchema that the services would default to if the service is not able to validate an object but that doesn’t seem to work.

    Thanks


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


  • 4.  RE: JDBC CustomSQL, DynamicSQL - Schema

    Posted Wed March 14, 2007 08:01 PM

    I am not aware of such property in CustomSQL

    Documentation on CustomSQL says that.

    “Because an adapter service that uses custom SQL provides no error checking, be sure that
    your SQL statement works correctly. You can verify SQL statement accuracy using your
    vendor’s SQL utility”

    I believe that you have to provide the correct SQL for it to work.


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


  • 5.  RE: JDBC CustomSQL, DynamicSQL - Schema

    Posted Wed March 14, 2007 08:39 PM

    Thanks sai.
    The SQL does work properly and was tested before the posting.

    The setting in the IS for JDBC adapters other properties states in the manual that currentSchema=YourCurrentSchema should work as I stated before but I can’t find any examples are someone who has used that property before.

    If you have more than one schema I guess you have to set up an adapter for each schema owner.

    Thanks for the reply


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