Problems caused by Oracle triggers when updating different records in the base table

Source: Internet
Author: User

Because you do not want to use the background code, you want to use the Oracle trigger for Operation updates. But because the trigger updates the base table, deadlock occurs. Therefore, you can use global variables on the Internet to solve this problem, however, an error has been reported in my row-level triggers for unknown reasons. The Code is as follows:

Create or replace package pkg_proinfo_update

As G_process in varchar2; G_id in number;
End;

Create or replace trigger proparent_process_prochild
Before update OF process
ON proinfo
FOR EACH ROW
When (old. proclass = 'General Project ')
BEGIN

FXYDATA. V_ROW: =: new. process;
FXYDATA. V_GUID: =: new. guId;

END;

Create or replace trigger pkg_proproc_update
After update on proinfo
Begin
UPDATE proinfo p SET p. parentstate = pkg_proinfo_update.G_process
WHERE p. parentguid = pkg_proinfo_update.G_id;
End;

Recommended reading:

GoldenGate performs two-way Oracle-Oracle replication without using a Data Pump

One-way Oracle-Oracle Replication Using the GoldenGate Data Pump

How to debug Oracle Data Pump (expdp/impdp)

Oracle Database Export data pump (EXPDP) file storage location

Export of Oracle 10g Data Pump Partition Table

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.