Trigger text from db
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: Trigger text from db

  1. #1
    Join Date
    Apr 2001
    Posts
    21
    How to see the source of a trigger in the database.
    if i give


    SQL> select text from user_source where
    name='TRIGGER_S_ORG_EXT_ADDR' AND TYPE = 'TRIGGER';

    no rows selected

    and if i give
    SQL> select distinct type from user_source;

    TYPE
    ------------
    PROCEDURE

    1 row selected.
    i am not able to see the source oftrigger. why? How can i see
    the source of a trigger in the database.
    thanks
    joe_kk

  2. #2
    Join Date
    Nov 2000
    Location
    Baltimore, MD USA
    Posts
    1,339
    Try USER_TRIGGERS.TRIGGER_BODY

    - Chris

  3. #3
    Join Date
    Apr 2001
    Posts
    21

    Trigger

    chris
    how to view the whole text of the trigger from the user_triggers
    joe_kk

  4. #4
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    I guess you are trying to view it in SQL*Plus. USER_TRIGGERS.TRIGGER_BODY is of type LONG and in SQL*Plus by default you see only first 80 characters from long datatype. If you want to see more, set the appropriately high number of SQL*Plus's set variable LONG:

    SQL> SET LONG 1000000
    SQL> SELECT trigger_body FROM user_triggers WHERE.....
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  5. #5
    Join Date
    Nov 2000
    Location
    Baltimore, MD USA
    Posts
    1,339
    Yet another reason not to use that awful tool

    - Chris

Posting Permissions

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


Click Here to Expand Forum to Full Width