Q
Problem solve Get help with specific problems with your technologies, process and projects.

Logging failed trigger, automatically trying again

I created a trigger to insert into a table on remote database over dblink, and it worked well, but sometimes the status of dblink is not ok, and the trigger fails to insert data. I want to control that error, such that each time the trigger fails to do its job, it should log that undone data and automatically try again later. Please guide me in this problem.

You will have to modify your trigger slightly to catch an EXCEPTION. The exception you are trying to catch is called "WHEN OTHERS". When other errors occur (i.e. a dblink is down), then handle the trigger in a different manner. You might want to just insert into a local table until the network connection is restored.

For More Information


Dig Deeper on Oracle database design and architecture

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close