Problems creating a trigger in Oracle 11g

前端 未结 3 2088
伪装坚强ぢ
伪装坚强ぢ 2021-02-05 07:23

I get a weird error while trying to create a trigger in my Oracle 11g database using SQL Developer. Here is what I did:

My table:



        
相关标签:
3条回答
  • 2021-02-05 07:58

    There may be a solution for this here.

    0 讨论(0)
  • 2021-02-05 08:00

    I have no other solution (and don't have the reputation to merely comment), but here is some information that might help get someone on the right track to solving this problem while still using PL/Scope.

    I just had a similar issue, and looking into the PL/Scope feature helped me understand where the problem might come in. For my issue, I tried to create a trigger and the same exact error came up. I changed the body of the trigger to no avail, but changing the name worked fine.

    It seems the the PL/Scope was holding onto information about the first instantiated trigger, before dropping it. A query on the triggers revealed my trigger was surely dropped, but a query on the (PL/Scope) identifiers ("all_identifiers") showed it was still there.

    Some information on PL/Scope is here: http://www.oracle.com/technetwork/testcontent/o67asktom-101004.html

    Chapter 8 here (11g documentation) has more information: http://docs.oracle.com/cd/B28359_01/appdev.111/b28424.pdf

    0 讨论(0)
  • 2021-02-05 08:05

    I finally found the answer to my problem:

    Add this:

    ALTER SESSION SET PLSCOPE_SETTINGS = 'IDENTIFIERS:NONE';
    

    Or in Oracle SQL Developer:

    1. Go to Tools | Preferences
    2. Select Database | PL/SQL Compiler
    3. Change the PLScope identifiers from All to None
    4. Click on Ok

    This fixes the issue...

    0 讨论(0)
提交回复
热议问题