Invalid status to Valid

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Invalid status to Valid

satish
Dear Erman,

We have created one function yesterday which went to invalid state after creation.But today,when we check that it is showing valid status.Below is the function.Without any explicit compilation from dba,what might be the reason to change invalid state to valid.


create or replace FUNCTION xxabr.xxabr_value_autopopulate
     RETURN VARCHAR2 AS
l_value VARCHAR2(100);

BEGIN
    SELECT
        'WO_'||xxabr.xxabr_WO_SEQ.nextval INTO l_value
        FROM
        dual;
        RETURN l_value;
END;

Thank You
Reply | Threaded
Open this post in threaded view
|

Re: Invalid status to Valid

satish
Missed to update our EBS version 12.2.5
DB version 12.1.0.2
Reply | Threaded
Open this post in threaded view
|

Re: Invalid status to Valid

ErmanArslansOracleBlog
Administrator
You use a sequence in that function.
So probably, there were some actions taken on that sequence..
For instance If you drop the sequence, the fuction will go invalid ..
You know what I mean..
Reply | Threaded
Open this post in threaded view
|

Re: Invalid status to Valid

satish
Thanks erman.But my question is how it can become valid without any explicit compilation from dba

Reply | Threaded
Open this post in threaded view
|

Re: Invalid status to Valid

ErmanArslansOracleBlog
Administrator
that is clear..
If you drop the sequence your dependent object will be invalid.
So far so good..
After you create that sequence again and then run your object/function, it'll successfully recompile itself automatically.

that is it.. You can test it yourself too.