Home » RDBMS Server » Server Administration » Trigger question
Trigger question [message #372015] Wed, 03 January 2001 14:25 Go to next message
SwapanDas
Messages: 2
Registered: January 2001
Junior Member
I have a trigger on insert on a table. If two users
tries to insert on the table at the same time, will it
fire the trigger twice at the same time and two copies of the trigger will be running?
Re: Trigger question [message #372016 is a reply to message #372015] Wed, 03 January 2001 14:32 Go to previous messageGo to next message
Ravi Prasad
Messages: 9
Registered: January 2001
Junior Member
Hi

the trigger will be firing for each insert statement

whenever the insert statement is successful
(if it is after insert) the trigger will be fired

bye
ravi
Re: Trigger question [message #372023 is a reply to message #372015] Thu, 04 January 2001 12:37 Go to previous messageGo to next message
Shanthi Ramayanapu
Messages: 22
Registered: October 2000
Junior Member
If two users are trying to Insert into a table, one has to wait for the other to finish. Oracle locks the table when an insert/update/delete is executed on it.
Hope this answers your question.
Re: Trigger question [message #372025 is a reply to message #372015] Thu, 04 January 2001 13:10 Go to previous messageGo to next message
SwapanDas
Messages: 2
Registered: January 2001
Junior Member
Thanks for your reply.
You talked about table lock. Do you mean lock at the table level or row level?
Re: Trigger question [message #372076 is a reply to message #372015] Tue, 09 January 2001 06:57 Go to previous message
Sandeep Udupa
Messages: 9
Registered: January 2001
Junior Member
When you give an INSERT statement, then ORACLE locks the table till the INSERT is completed successfully. Then the other users can't INSERT till the first INSERT is not completed.

so, there is no chance of ORACLE firing the TRIGGER twice contionously. The second trigger will fire after the first is completed

Hope this answer your question.
Previous Topic: SQL Loader Question - Keeping blanks as blanks instead of nulls
Next Topic: To get primary and corresponding foreign key
Goto Forum:
  


Current Time: Sun May 19 11:15:09 CDT 2024