Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to see TRIGGER already set up in DB2 table

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
rohanthengal

Active User


Joined: 19 Mar 2009
Posts: 181
Location: Globe, India

PostPosted: Mon Sep 16, 2013 3:00 pm    Post subject: How to see TRIGGER already set up in DB2 table
Reply with quote

I want to see the existing triggers setup on few of tables.

I have run below sample SQL in SPUFI query but i found 0 ROWS DISPLAYED message.

Code:
select NAME from SYSIBM.SYSTRIGGERS where TBNAME = 'EMPLOYEE';

assume EMPLOYEE is my table name...

Is there any other means to check TRIGGERS on desired tables ?
Back to top
View user's profile Send private message

sharad_shanu

New User


Joined: 03 Oct 2006
Posts: 40

PostPosted: Wed Aug 27, 2014 6:35 pm    Post subject:
Reply with quote

well.....which table you are referring to...The one which triggers the event or the one which is impacted?

Lets assume I have a table TAB1. There is a trigger TGR0 which says that whenever a new record is added in the table TAB1 there should also be an insert into another table TAB2.

Now which table you are giving in your query TAB1 or TAB2???
Please note that TBNAME column in your query will have the causing table (TAB1). In case you want to find out whether are there any tables which are getting impacted then you should look at column name STATEMENT. Your query should look like:

Code:

SELECT NAME FROM SYSIBM.SYSTRIGGERS WHERE STATEMENT LIKE ('%tab2%');


In the SYSIBM.SYSTRIGGERS table:
tbname = TAB1
name = TRG0
statement = Entire trigger SQL statement which has impacted table names ie TAB2
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 unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm
No new posts Application not run by time HH:MM tri... jzhardy IBM Tools 1 Sun Apr 09, 2017 3:22 pm
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm
No new posts Join of more than one table dibyendumandal11111 DB2 6 Mon Feb 13, 2017 11:36 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us