Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2004
    Posts
    24

    Unanswered: get application name which modify the table

    I want to create a trigger after the table is modified, I want to get the application name which modify the table in the trigger action, I know that there are function like application() in other database, what can I do in DB2? thanks in advance~

  2. #2
    Join Date
    Nov 2004
    Posts
    374

    application id

    see : SELECT APPLICATION_ID() AS APPL_ID
    FROM SYSIBM.SYSDUMMY1

    Best regards, Guy Przytula
    Best Regards, Guy Przytula
    DB2/ORA/SQL Services
    DB2 DBA & Advanced DBA Certified
    DB2 Dprop Certified
    http://users.skynet.be/przytula/dbss.html

  3. #3
    Join Date
    Feb 2004
    Posts
    21

    Talking

    Quote Originally Posted by przytula
    see : SELECT APPLICATION_ID() AS APPL_ID
    FROM SYSIBM.SYSDUMMY1

    Best regards, Guy Przytula
    hi,przytula
    when i use your sql,i got the wrong message like this:
    ##########
    SQL0440N No function by the name "APPLICATION_ID" having compatible arguments
    was found in the function path. SQLSTATE=42884
    ##########
    both i have tried on v7 and v8,are u sure with your sql?
    regards

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Check out these special registers as documented in the SQL Reference, Vol 1:

    CLIENT ACCTNG
    CLIENT APPLNAME
    CLIENT USERID
    CLIENT WRKSTNNAME
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  5. #5
    Join Date
    Oct 2004
    Posts
    8
    The Application_id() seems to be a new function in 8.2

Posting Permissions

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