Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

looking at triggers with sqlplus

Status
Not open for further replies.

dwhalen

Programmer
Feb 22, 2002
105
CA
Hello,

First, how can I see what triggers are on a table (or defined on a table or whatever you want to call it)?

Second, how can I see the defination of a particular trigger?
This is all from sqlplus. I am thinking along the lines of
"describe trigger_name"....but I might be way off, but there has to be some way to see a trigger defination...right?


Thanks for the help.

Later
 
Hi,
Query ALL_TRIGGERS ( OR DBA_TRIGGERS, USER_TRIGGERS, depending on rights)...

Code:
Oracle9i Enterprise Edition Release 9.2.0.2.1 - Production
PL/SQL Release 9.2.0.2.1 - Production
CORE    9.2.0.2.0       Production
TNS for 32-bit Windows: Version 9.2.0.2.0 - Production
NLSRTL Version 9.2.0.2.0 - Production

SQL> desc all_triggers
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 OWNER                                              VARCHAR2(30)
 TRIGGER_NAME                                       VARCHAR2(30)
 TRIGGER_TYPE                                       VARCHAR2(16)
 TRIGGERING_EVENT                                   VARCHAR2(227)
 TABLE_OWNER                                        VARCHAR2(30)
 BASE_OBJECT_TYPE                                   VARCHAR2(16)
 TABLE_NAME                                         VARCHAR2(30)
 COLUMN_NAME                                        VARCHAR2(4000)
 REFERENCING_NAMES                                  VARCHAR2(128)
 WHEN_CLAUSE                                        VARCHAR2(4000)
 STATUS                                             VARCHAR2(8)
 DESCRIPTION                                        VARCHAR2(4000)
 ACTION_TYPE                                        VARCHAR2(11)
 TRIGGER_BODY                                       LONG

[profile]
 
Thanks for the help :). That is exacly what I needed. I was beating my head against a wall for that one :(. I wish there was more in the help file for sqlplus from the command line. Oh well, at least I have this form and people like you ;)



Later
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top