Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: How can I import only tables and data without triggers, stored procedures or other objects?

Re: How can I import only tables and data without triggers, stored procedures or other objects?

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Wed, 18 Jan 2006 07:10:21 +0100
Message-ID: <43cddbcf$0$22226$626a14ce@news.free.fr>

"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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US