Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Log an Plan name/id or Job Id using DB2 Triggers

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
SENTHIL MURUGAAN
Warnings : 1

New User


Joined: 12 Jan 2013
Posts: 32
Location: India

PostPosted: Mon Oct 22, 2018 4:17 pm    Post subject: Log an Plan name/id or Job Id using DB2 Triggers
Reply with quote

Hello All,

We have created a DB2 Triggers to log all the deletion action on each rows from X table.
[CREATE TRIGGER TST.GX
AFTER DELETE ON TST.X
REFERENCING OLD AS O
FOR EACH ROW MODE DB2SQL
INSERT INTO TST.XD
( ID_X,
DELETEBY,
DELETEDT,
DELETEHMS)
VALUES
( O.ID_X,
SESSION_USER,
CURRENT DATE,
CURRENT TIME)]

But when we tried to delete rows from table X thru both SPUFI (Manual) and BATCH job execution, we could see both entries "SESSION_USER" values are same as developer id.

Kindly please advise how to store an either PLAN NAME/JOB NAME value in log table to trace the deletion log done by either user or application batch?

Thanks
Back to top
View user's profile Send private message

View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Usage/Utiliy of Plan in DB2 arijitS DB2 4 Thu Jun 21, 2018 8:16 pm
No new posts How do I define a DB2 plan for a web ... John Poulakos CICS 5 Sat Apr 14, 2018 1:58 am
No new posts CICS web service from DB2 Triggers or... kiranprasad DB2 2 Wed Dec 20, 2017 11:10 am
No new posts Finding the plan when code compiled u... Ahemad DB2 2 Fri Dec 01, 2017 6:38 pm
No new posts Bind plan as a member to another bind... rexx77 DB2 0 Thu Feb 16, 2017 2:02 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us