Solved

I want to run invalid packages periodically with DBMS task.

  • 15 October 2020
  • 5 replies
  • 301 views

Userlevel 5
Badge +8

 

Hello

I want to run invalid packages periodically with DBMS task. Is there a procedure that runs when the compile button is clicked on the picture?

 

 

icon

Best answer by Ruchira 15 October 2020, 10:02

View original

5 replies

Userlevel 5
Badge +12

You should be able to use below method

for all objects;

EXEC Database_SYS.Compile_All_Invalid_Objects;

 

 

Userlevel 5
Badge +8

@Ruchira  thank you so much.

Userlevel 7
Badge +18

It’s worth asking…. Why? What is causing them to become invalidated?

 

Objects don’t just become invalid on their own. For example, if you have an FNDMIG migration job that creates an IC_ table, it will drop that table before recreating it. If you have a package that depends on the IC_ table, it will become invalidated when the table gets dropped.

 

Each time an invalid object is referenced, a user who wants to use the object will have to wait for it to be recompiled, serially in real time. If this succeeds, the object will be valid for every user until it becomes invalid again.

 

If the package contains globals--and packages to the IFS spec always do--then any user who previously used the package in their session will get the error message “existing state of packages discarded”. In the worst case, this can cause the user to lose work, and in the best case, it looks unprofessional for the IT department.

 

Recompiling the objects from an administrator’s seat will hide the fact that users are waiting for recompilations and receiving these errors, and it hides why your objects are getting invalidated in the first place.

Userlevel 5
Badge +8

 

Hi @durette 

Since our company is an international ship company, instant intervention may be required in case of problems. For this reason, api objects are instantly validated with right click edit. Objects become invalid in errors that may occur during compilation. Even if it is a rare situation, it is a precautionary action.

Userlevel 7
Badge +18

in case of problems

Can you be more specific?

Reply