Home » SQL & PL/SQL » SQL & PL/SQL » Trigger Vs Alerts
Trigger Vs Alerts [message #224264] Tue, 13 March 2007 11:23 Go to next message
ziggy25
Messages: 206
Registered: July 2005
Senior Member

Could someone please explain or provide a link that explains the difference between a Trigger and an Alert.



Thanks
Re: Trigger Vs Alerts [message #224267 is a reply to message #224264] Tue, 13 March 2007 11:37 Go to previous messageGo to next message
ThomasG
Messages: 3189
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
The DIFFERENCE?

Well, they have nothing whatsoever in common at all, aside from having someting to do with oracle.

A trigger is part of the database and connected to a table, where it executes actions on insert, update or delete on that table.

An alert is something ( like an error or a warning ) that is written to the alert.log

Re: Trigger Vs Alerts [message #224268 is a reply to message #224267] Tue, 13 March 2007 11:43 Go to previous messageGo to next message
ziggy25
Messages: 206
Registered: July 2005
Senior Member
I thought both can be used to perform an action depending on some condition in the database. Are alerts only used for logging?

Can one fire an Alert as a result of an INSERT?

[Updated on: Tue, 13 March 2007 11:47]

Report message to a moderator

Re: Trigger Vs Alerts [message #224270 is a reply to message #224268] Tue, 13 March 2007 12:13 Go to previous messageGo to next message
ThomasG
Messages: 3189
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
No, not directly.

You would have to create a trigger that fires the alert via dbms_alert, like in the last of the examples here :

http://www.cs.umbc.edu/help/oracle8/server.815/a68001/dbms_ale.htm

So I would say use alerts when you want to notify some other application of some events, and triggers if you want to change data inside of oracle on DML - events.
Re: Trigger Vs Alerts [message #224290 is a reply to message #224270] Tue, 13 March 2007 14:19 Go to previous message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
On the other side, are you talking about Forms triggers and alerts?
Previous Topic: updating table
Next Topic: How to Find out which time Tirgger got fired
Goto Forum:
  


Current Time: Fri Dec 09 03:44:38 CST 2016

Total time taken to generate the page: 0.10745 seconds