Create trigger failed

When I create the TRIGGER “GO_AA” But it keeps getting errors about the “PLS-00201: identifier ‘BDF_SC_SESSION.ISENABLED’ must be declared”,
How to fix it?

1 Like

Hi Danny,

The installation zip file contains a script named 02_GITORA_install.sql. This script has the package BDF_SC_SESSION in it. I doublechecked the the file. The isEnabled function is in this script. Are you sure that you executed this script successfully? If you did, you should see a lot of packages in the GITORA schema.

Kind Regards,
Yalim

Hi Danny,

Ok. So it looks like the packages are not created in your Gitora schema.
Executing the 02_GITORA_install.sql script must create the packages. Can you please attempt to execute this script again?

For what it is worth, this issue of missing packages has happened to at least one more user. But he didn’t tell us what the problem was. I’d really appreciate it if you let us know why executing this script doesn’t create the packages.

Kind Regards,
Yalim

hi,
i’m experiencing the same issues.
imo it might have something to do with the triggers being enabled but invalid at the same time.
i was able to deploy the packages with the install-script after manually disabling the triggers (the install-script enables them again)
greetings, daniel

Hi I’m having the same issue. All the package installations fail with the message:

ORA-04098: trigger ‘GITORA.GO_AC’ is invalid and failed re-validation
04098. 00000 - “trigger ‘%s.%s’ is invalid and failed re-validation”
*Cause: A trigger was attempted to be retrieved for execution and was
found to be invalid. This also means that compilation/authorization
failed for the trigger.
*Action: Options are to resolve the compilation/authorization errors,
disable the trigger, or drop the trigger.

The error in the trigger is:

  • Error(51,8): PLS-00201: identifier ‘BDF_SC_SESSION.ISENABLED’ must be declared

Jonathan

Hi Jonathan,

We received this issue you ran into often from users. However we don’t run into it at all. We suspect it is SQL Plus stopping the execution of the script when there is an error.

Our guess is that if you put the following command at the top of the script, it should let you execute the script without stopping: WHENEVER SQLERROR CONTINUE.

The script has packages and triggers. They all need to be executed. The order of execution is not important. So if something doesn’t execute, you can skip it and attempt to execute later.

Hope this helps.

I’d appreciate it if you could let us know how you solved the problem.

Kind Regards,
Yalim

Additionally, it seems like your Gitora triggers got created but they are (naturally) not compiled. Can you please disable them before proceeding? They all start with the prefix GO_ .

You can enable them again after all scripts are executed.

Kind Regards,
Yalim

Hi Yalim,

I’m unable to disable the triggers because of the error. So I have commented out the lines that caused the error and re-complied.

Best wishes,

Jonathan

Thank you for the update Jonathan. In the meantime, we are looking into how we can improve this script. I apologize for the inconvenience.

Kind Regards,
Yalim

Hi Yalim,
I used WHENEVER SQLERROR CONTINUE at the top of the script and it did the trick. Perhaps you should add it to the script as the first line?

Thanks for your help.

Jonathan

Yes, absolutely. It is going to the top of the script. Thank you Jonathan!