DBAsupport.com Forums - Powered by vBulletin
Results 1 to 7 of 7

Thread: source code of triggers

  1. #1
    Join Date
    Mar 2004
    Location
    IA USA
    Posts
    257

    source code of triggers

    DBAs,

    Right now we don't give the password of schema owner to the developers in our test environment.
    But they have full control in dev.
    The problem is that they always lose track of their triggers deployment verison.
    So, we get a lot of requests that sending the source code of triggers to them so that
    they can compare the source codes between dev and test.

    Is there any good way to let them have a way to see the trigger's source code
    without giving them the password of schema owner?

    Thanks!

    Lily

  2. #2
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    create a view based on user_triggers.

    then tell then to get their source control / cm processes sorted

  3. #3
    Join Date
    Feb 2003
    Posts
    63

    View - DBA_SOURCE

    Create a view on DBA_SOURCE this way you will be able to show them the text associated with the trigger and they can select from this when they need to

    Regards

  4. #4
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    dba_source doesnt have triggers, user_triggers does (like i said before)

  5. #5
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    dba_source does contains trigger body

    Code:
    select text from dba_source where name = 'REPCATLOGTRIG';
    
    TEXT
    --------------------------------------------------------------------------------
    TRIGGER system.repcatlogtrig
    AFTER UPDATE OR DELETE ON system.repcat$_repcatlog
    BEGIN
      sys.dbms_alert.signal('repcatlog_alert', '');
    END;

  6. #6
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    Quote Originally Posted by pando
    dba_source does contains trigger body
    It does since oracle9i (definitely from rel.2, not sure for rel.1). It didn't contain trigger code in 8.1.7 or earlier.
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  7. #7
    Join Date
    Mar 2004
    Location
    IA USA
    Posts
    257
    Yes, in Oracle 8i, the dba_source does not include the code for triggers. I am working on creating a view for dba_triggers.
    But the trigger_body is a long type.
    It seems that when I use select in sqlplus, it doesn't show the
    whole text. Is there some package I need to use to display a long type column?

    Thanks!

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