Hi Jim, thanks for your answer. I just had to give a recommendation what to do and luckily i am not responsible for the development. Our dbas told us that htey often had the problem that a triggero sometimes got invalid and nobody knows thy. and they said that also people tho teach oracle databases told them in a low voice not to use triggers. we'll see how my chef will decide. Thanks alot for your answer, Georg -----Ursprüngliche Nachricht----- Von: programmingblind-bounce@xxxxxxxxxxxxx [mailto:programmingblind-bounce@xxxxxxxxxxxxx] Im Auftrag von Jim Dunleavy Gesendet: Donnerstag, 29. Januar 2009 17:45 An: programmingblind@xxxxxxxxxxxxx Betreff: Re: trigger question Hi Georg, I would use a trigger to do that. A trigger can be disabled explicitly by the alter trigger command, or by becoming invalid as a result of compilation errors. I've also seen it happen after an import of a dump file created by a full export. I can't remember the exact details, but I think it was because of some inter-dependency thing. A trigger suddenly becoming disabled in a production database would be a sign of something seriously wrong (database corruption, a rogue DBA?) and would be just as likely to happen to any other type of duplication mechanism based on stored procedures. If you need to investigate the cause of such strange events, you could set up DDL triggers which would log the time and date, username, event type, and object names of these events. You could set the DDL trigger under a more secure role than the role of the regular objects so as to minimize the risk of the DDL trigger itself being disabled. HTH --Jim ----- Original Message ----- From: Kellerer, Georg (LfU) <Georg.Kellerer@xxxxxxxxxxxxx> To: <programmingblind@xxxxxxxxxxxxx> Sent: Thursday, January 29, 2009 8:13 AM Subject: trigger question > Hi all, > > we are on to decide if we should use Triggers or stored procedures in > our oracle database for data duplication. our problem now is that we > don't know if it is possible to detect a disabled trigger at runtime. we > are using an oracle 9i databse system and want to know when a trigger > has not been fired and the copieng of the record was not successful. I > know the all_triggers-Table where i can see the state of a trigger but > isn't there a posibility to get an error-message when a speciffic > trigger is disabled? > > thanks a lot for your help. > greetings, > Georg > __________ > View the list's information and change your settings at > //www.freelists.org/list/programmingblind > ---------------------------------------------------------------------------- "Information in this email (including attachments) is confidential. It is intended for receipt and consideration only by the intended recipient. If you are not an addressee or intended recipient, any use, dissemination, distribution, disclosure, publication or copying of information contained in this email is strictly prohibited. Opinions expressed in this email may be personal to the author and are not necessarily the opinions of the HSE. If this email has been received by you in error we would be grateful if you could immediately notify the ICT Service Desk by telephone at +353 1 6352757 or by email to service.desk@xxxxxxxxxxxx and thereafter delete this e-mail from your system" ---------------------------------------------------------------------------- __________ View the list's information and change your settings at //www.freelists.org/list/programmingblind __________ View the list's information and change your settings at //www.freelists.org/list/programmingblind