-
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
-
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.
-
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|