RE: Import / Triggers

RE: Import / Triggers

 

  


second statement off course should be :

select 'alter trigger '||owner||'.'||trigger_name||' enable;'
from all_triggers
where owner like 'XXX%'
and status <> 'ENABLED'
order by 1;

-----Original Message-----
From: Hans
[mailto:oracledba-ezmlmshield-x25053544.[Email address protected]
Sent: woensdag 10 mei 2006 14:07
To: LazyDBA Discussion
Subject: RE: Import / Triggers


1. No
2.


Before the export :

select 'alter trigger '||owner||'.'||trigger_name||' disable;'
from all_triggers
where owner like 'XXX%'
and status = 'ENABLED'
order by 1;


After completion of the import :

select 'alter trigger '||owner||'.'||trigger_name||' enble;'
from all_triggers
where owner like 'XXX%'
and status <> 'ENABLED'
order by 1;


Regards
Hans

-----Original Message-----
From: Brett N Exton [mailto:oracledba-ezmlmshield-x99922815.[Email
address protected]
Sent: woensdag 10 mei 2006 13:54
To: LazyDBA Discussion
Subject: Import / Triggers


Doing an Import into two tables TableA and TableB.

I am getting a unique constraint violation when importing TableB because
an INSERT trigger set on TableA has already done an insert which was
"triggered" when the data was imported into TableA.

Somebody told that I could disable the trigger using Oracle Enterprise
Manager. However I am not a lover of GUI tools but it atleast got around
my import problem.

I was fortunate that this only affected two tables so was quick and easy
to do but it concerns me if I had multiple tables/triggers.

So my questions are:

1) Is there an import parameter that I should set to prevent triggers
from being activated when doing the import ?

2) Or is there a quick and easy SQL which would turn all the necessary
triggers offline prior to the import and then a re-enable afterwards

Oracle Version is: 9.2.0.6

TIA

--
Brett Exton.



________________________________________________________________________
This e-mail and any attachments transmitted with it represents the views
of the individual(s) who sent them and should not be regarded as the
official view of Bridgend County Borough Council. The contents are
confidential and intended solely for the use of the addressee. If you
have received it in error, please inform the system administrator on
(+44) 01656 642111.

This e-mail and any attachments have been scanned with 'MessageLabs
SkyScan' - http://www.messagelabs.com/

________________________________________________________________________
Maer'r e-bost hwn ac unrhyw atodiadau a drosglwddir gydag ef yn
cynrychioli safbwyntiau'r unigolyn (unigolion) a'u hanfonodd ac ni
ddylid eu hystyried fel safbwynt swyddogol Cyngor Bwrdeistref Sirol
Pen-y-bont ar Ogwr. Mae'r cynnwy syn gyfrinachol ac wedi'i fwriadu at
ddefnydd y person y'i cyfeiriwyd ato yn unig. Os ydych wedi ei dderbyn
mewn camgymeriad, rhowch wybod i weinyddwry system ar (+44) 01656
642111.

Mae'r e-bost hwn ac unrhyw atodiadau wedi cael eu sganio gyda
'MessageLabs SkyScan' - http://www.messagelabs.com/
________________________________________________________________________


--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html
-----------------------------------------------------------------
ATTENTION:
The information in this electronic mail message is private and
confidential, and only intended for the addressee. Should you receive
this message by mistake, you are hereby notified that any disclosure,
reproduction, distribution or use of this message is strictly
prohibited. Please inform the sender by reply transmission and delete
the message without copying or opening it.

Messages and attachments are scanned for all viruses known.
If this message contains password-protected attachments, the files have
NOT been scanned for viruses by the ING mail domain. Always scan
attachments before opening them.
-----------------------------------------------------------------



--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html
-----------------------------------------------------------------
ATTENTION:
The information in this electronic mail message is private and
confidential, and only intended for the addressee. Should you
receive this message by mistake, you are hereby notified that
any disclosure, reproduction, distribution or use of this
message is strictly prohibited. Please inform the sender by
reply transmission and delete the message without copying or
opening it.

Messages and attachments are scanned for all viruses known.
If this message contains password-protected attachments, the
files have NOT been scanned for viruses by the ING mail domain.
Always scan attachments before opening them.
-----------------------------------------------------------------


Oracle LazyDBA home page