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

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

  1. #1
    Join Date
    Feb 2002
    Posts
    267

    Exporting triggers,snapshot etc...with table

    Hi,

    How can i export a table, along with the triggers,snapshot, views etc...associated with the table.



    Regards
    sonia

  2. #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.

  3. #3
    Join Date
    Apr 2002
    Location
    Germany.Laudenbach
    Posts
    448
    Hi,
    the way is another App which supports something like this,
    i use PL/SQL-Developer with some export-features from www.allroundautomations.com

    Orca

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