Results 1 to 8 of 8
  1. #1
    Join Date
    Jun 2008
    Posts
    9

    Question Unanswered: Stored Procedure not working on DB2 8.1.14 on Windows XP

    Hi,

    Im trying to execute a C Stored Procedure(getTransactionId.sqc) from one of Developer Works articles "Transaction IDs in DB2 -- retrieve a unique identifier for a unit of work from the DB2 log records" by Knut Stolze and Im getting the following error upon issueing the command "db2 => CALL getTransactionId(?)"
    .................................................. ...................
    SQL0444N Routine "*ACTIONID" (specific name "GETTRANSACTIONID") is
    implemented with code in library or path "...\getTransactionId.DLL", function
    "getTransactionId" which cannot be accessed. Reason code: "4".
    SQLSTATE=42724
    .................................................. ................

    The dll file("getTransactionId.dll" is there under FUNCTION subdirectory). The contents of the script "getTransaction.db2" that is used for stored procedure registration with the database are as follows:
    .................................................. ..........
    CREATE PROCEDURE getTransactionId ( OUT transactionId CHAR(12) )
    SPECIFIC getTransactionId
    DYNAMIC RESULT SETS 0
    MODIFIES SQL DATA
    NOT DETERMINISTIC
    NEW SAVEPOINT LEVEL
    LANGUAGE C
    EXTERNAL NAME 'D:\Programs\IBM\SQLLIB\FUNCTION\getTransactionId! getTransactionId'
    FENCED THREADSAFE
    NO EXTERNAL ACTION
    PARAMETER STYLE SQL
    PROGRAM TYPE SUB
    NO DBINFO@
    .................................................. .........
    and the contents of the getTranactionId.def file are as follows (I created this file manually):
    .................................................. .........
    ; getTransactionId.def : Declares the module parameters for the DLL.

    LIBRARY "getTransactionId"

    EXPORTS
    getTransactionId
    ; Explicit exports can go here
    .................................................. ..........

    I've tried various ways but haven't been able to get to the root of the problem. I applied FixPak 14 as well but the problem is still there.
    I've posted my query so many times on "developer works" but no one has replied yet.

    Please help me. Its urgent.

    Actually, the whole idea is to read DB2 Log files using db2api. If anyone has any idea about this, please help.

    Thanks for any help.

  2. #2
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    Quote Originally Posted by db2query
    CREATE PROCEDURE getTransactionId ( OUT transactionId CHAR(12) )
    SPECIFIC getTransactionId
    DYNAMIC RESULT SETS 0
    MODIFIES SQL DATA
    NOT DETERMINISTIC
    NEW SAVEPOINT LEVEL
    LANGUAGE C
    EXTERNAL NAME 'D:\Programs\IBM\SQLLIB\FUNCTION\getTransactionId! getTransactionId'
    Remove all this directory stuff and just leave it as:
    Code:
    EXTERNAL NAME 'getTransactionId!getTransactionId'
    (Just like I wrote it in the article.) DB2 will automatically search the sqllib/function/ directory of your instance to find the respective library.

    If that still doesn't work, you may have to link in some additional DB2 libraries. I know you need different libraries for some things on Windows than on Linux. But I don't work with Windows very much, so I don't know exactly what differences there are.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

  3. #3
    Join Date
    Jun 2008
    Posts
    9

    Question

    Thanks for the help.

    I removed the directory stuff but its still giving that same error upon stored procedure execution:

    SQL0444N Routine "*ACTIONID" (specific name "GETTRANSACTIONID") is
    implemented with code in library or path "...\getTransactionId.DLL", function
    "getTransactionId" which cannot be accessed. Reason code: "4".
    SQLSTATE=42724


    Can u please tell me what additional DB2 libraries do I have to link ? and how can I link them so that the procedure exceutes fine on my system ?

    Thanking in anticipation.

  4. #4
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    As I said, I don't work often enough with Windows to say which additional DB2 libraries you need.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

  5. #5
    Join Date
    Jun 2008
    Posts
    9

    Question

    Hi Stolze,

    Thats fine if you dont work with Windows.

    Can u please refer me to somebody in IBM who might know about this ? or who might be able to help me in this regard because the objective is to read the DB2 transaction log files successfully.

    Its a very urgent and a critical task and it would be nice of you if you get me connected to someone who can help me in resolving this critical problem.

    Thanks for any help. Its very urgent.

  6. #6
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    In that case, I recommend that you call IBM support and open a PMR.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

  7. #7
    Join Date
    Jun 2008
    Posts
    9

    Question

    For me, the easiest would be to contact somebody on email. Can u refer somebody for email so that this thing doesn;t get stuck in here.

    Thanks.

  8. #8
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    Ok, my last post on this subject: if you have an urgent problem and need dedicated help, then IBM support is the way to go. That's what it is there for.

    In theory, whenever we (IBM employees) get a request/question from a customer via email, we are encouraged to respond with an email that points you to IBM support as well. I say "in theory" because I often don't do that (and probably others as well) and try to help directly - if I can.
    Last edited by stolze; 06-20-08 at 09:20.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

Posting Permissions

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