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

Thread: Exporting triggers,snapshot etc...with table

Threaded View

  1. #2
    Join Date
    Jan 2001
    Posts
    2,828
    Hi

    Nope export will not do that for you..you should query user_source for getting the source of them..

    For a trigger you can code somethin like this

    select
    'create or replace trigger "' ||
    trigger_name || '"' || chr(10)||
    decode( substr( trigger_type, 1, 1 ),
    'A', 'AFTER', 'B', 'BEFORE', 'I', 'INSTEAD OF' ) ||
    chr(10) ||
    triggering_event || chr(10) ||
    'ON "' || table_owner || '"."' ||
    table_name || '"' || chr(10) ||
    decode( instr( trigger_type, 'EACH ROW' ), 0, null,
    'FOR EACH ROW' ) || chr(10) ,
    trigger_body
    from user_triggers
    where trigger_name = upper('&1')
    /
    prompt /


    regards
    Hrishy

    P.S:I am not sure but those sql gui tools used by developers like TOAD might do that easily for ya..
    Last edited by hrishy; 02-14-2003 at 04:04 AM.

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