Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How can I import only tables and data without triggers, stored procedures or other objects?
"serge" <sergea_at_nospam.ehmail.com> a écrit dans le message de news: 3Sgzf.45810$Fl2.1121256_at_weber.videotron.net...
|I am currently using the IMP command to import an Oracle 8i database:
|
| imp userid=MyUsername/Mypassword_at_Myservicename buffer=50000
| file=C:\temp\abc.dmp fromuser=ExportUsername touser=MyUsername
| rows=y grants=n constraints=n ignore=y log=C:\temp\import.log
|
| Imp has the parameter to specify not to import constraints
| but how about triggers? And specifying the "tables" parameter
| doesn't help me either. At least I don't know how I can specify
| tables=ALL the tables. Even if I were to specify ALL tables would
| that mean that it will only import the tables and the data without triggers?
|
| If I can't NOT import the triggers then what is the command
| to use to DROP all the triggers? This way I will import as I am
| doing now and then simply DROP all the imported triggers.
|
| I would appreciate your help.
|
| Thank you
|
|
You can't import without triggers but you can export without them using "triggers=n".
You can drop all the triggers with:
set head off
set pages 0
set feedb off
set echo off
set linesize 120
set trimspool on
spool t.sql
select 'drop trigger '||trigger_name||';' from user_triggers;
spool off
@t
Regards
Michel Cadot
Received on Wed Jan 18 2006 - 00:10:21 CST