1. I have a Oracle database running in a Production system. I need to take the export of only table1, table2, table3 and the associated triggers. How will i specify the trigger in an export command.
2.If i have a Full database dump how will i import a specific procedure/ trigger only.
Thanks in advance
When u r exporting u have triggers option in export command.
I am not quite sure to exp/imp specific procedures.
There is NO triggers option when you are exporting
As far as I know triggers will be exported with a full system export / owner export
In order to recreate specific triggers you will need to have SHOW=Y on the import command line, redirect this into another file and edit the that file to show the creation statement
I hope this helps
:p :p :p
It would be much easier using a tool like SQL Navigator. Connect to your production database, look up the triggers etc you need and than do a extract DDL and then save the script and run it on the new schema.
Try this -
SQL> set arraysize 1
SQL> set long 5000
SQL> set pages 999
SQL> col description format a80 word_wrap
SQL> select * from all_triggers where trigger_name=' ';
You can also extract the DDL of a procedure by querying USER_SOURCE by logging in as the user itself. Then you execute it in another schema
Click Here to Expand Forum to Full Width