Home » SQL & PL/SQL » SQL & PL/SQL » Ora-04062 Timestamp Changed (Oracle 10g,)
Ora-04062 Timestamp Changed [message #549907] Wed, 04 April 2012 10:52 Go to next message
mamalik
Messages: 270
Registered: November 2008
Location: Pakistan
Senior Member

Dear All, I had follwoing function
Create Or Replace Function Fin_Prd(V_Dte In Date) Return Number Is
V_Fin_Str Number;
Begin
      Select To_Number(To_Char(Fin_Str,'MM')) Into V_Fin_Str From Nml.Cmp_00_00;
If To_Number(To_Char(V_Dte,'MM'))>V_Fin_Str Then
      Return(To_Number(To_Char(V_Dte,'MM')));
Else
      Return(V_Fin_Str);
End If;
End;


The above function was running well. Today i have made some change as under
Create Or Replace Function Fin_Prd(V_Dte In Date,V_Rtn_Flg In Number Default 0) Return Number Is
V_Fin_Str Number;
Begin
If V_Rtn_Flg=0 Then
      Select To_Number(To_Char(Fin_Str,'MM')) Into V_Fin_Str From Nml.Cmp_00_00;
If To_Number(To_Char(V_Dte,'MM'))>V_Fin_Str Then
      Return(To_Number(To_Char(V_Dte,'MM')));
Else
      Return(V_Fin_Str);
End If;
Else
Return(To_Number(To_Char(V_Dte,'YYYY')));
End If;
End;

Above function is created and working well when i use it in query in sql prompt or Toad. But problem is this that all function which used this are invalid and when i run report whose query use FIN_PRD then error is "Ora-04062. Timestamp of Fin_Prd has been changed".

Please guide, what is solution for it.

Thanks in Advance.

Regards,
Asif.
Re: Ora-04062 Timestamp Changed [message #549908 is a reply to message #549907] Wed, 04 April 2012 10:54 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
bcm@bcm-laptop:~$ oerr ora 4062
04062, 00000, "%s of %s has been changed"
// *Cause:  Attempt to execute a stored procedure to serve
//          an RPC stub which specifies a timestamp or signature that is
//          different from the current timestamp/signature of the procedure.
// *Action: Recompile the caller in order to pick up the new timestamp.
bcm@bcm-laptop:~$ 
Re: Ora-04062 Timestamp Changed [message #549910 is a reply to message #549908] Wed, 04 April 2012 11:00 Go to previous messageGo to next message
mamalik
Messages: 270
Registered: November 2008
Location: Pakistan
Senior Member

Thanks BlackSawan,

Oh, I have to compile all reports and forms for this. Its not too easy. I have many forms and reports which are using this.
Re: Ora-04062 Timestamp Changed [message #549911 is a reply to message #549910] Wed, 04 April 2012 11:01 Go to previous messageGo to next message
mamalik
Messages: 270
Registered: November 2008
Location: Pakistan
Senior Member

One thing more, we have changed several times in running fuctions and procedures used in our application but we never received such message, Today its first time that we are getting this error.
Re: Ora-04062 Timestamp Changed [message #549913 is a reply to message #549911] Wed, 04 April 2012 11:05 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
> Today its first time that we are getting this error.
consider yourself lucky.

so how exactly can we assist with this situation?
Re: Ora-04062 Timestamp Changed [message #549914 is a reply to message #549913] Wed, 04 April 2012 11:09 Go to previous messageGo to next message
mamalik
Messages: 270
Registered: November 2008
Location: Pakistan
Senior Member

Its means any procedure or function which is used in reports is changed then we will have to compile all that reports?
Re: Ora-04062 Timestamp Changed [message #549916 is a reply to message #549914] Wed, 04 April 2012 11:16 Go to previous message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
http://docs.oracle.com/cd/E11882_01/server.112/e25513/initparams206.htm#REFRN10182

Above might prove helpful; then again it might be a total waste of electrons.
Previous Topic: Auto update trigger
Next Topic: Can I revert back package changes to prev version?
Goto Forum:
  


Current Time: Sun Aug 31 19:39:09 CDT 2025