If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > get application name which modify the table

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-24-04, 01:43
carmenlei carmenlei is offline
Registered User
 
Join Date: Jun 2004
Posts: 24
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~
Reply With Quote
  #2 (permalink)  
Old 11-24-04, 03:05
przytula przytula is offline
Registered User
 
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
Reply With Quote
  #3 (permalink)  
Old 11-24-04, 20:51
Metatron Metatron is offline
Registered User
 
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
Reply With Quote
  #4 (permalink)  
Old 11-24-04, 21:01
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
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
Reply With Quote
  #5 (permalink)  
Old 11-25-04, 01:55
wildchoi wildchoi is offline
Registered User
 
Join Date: Oct 2004
Posts: 8
The Application_id() seems to be a new function in 8.2
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On