How to avoid DeadLock ORA-04020 error (on views)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AdusumalliGopikumar
    New Member
    • Aug 2007
    • 42

    How to avoid DeadLock ORA-04020 error (on views)

    Hi All,

    I have 29 set of jobs which will access the same VIEW, and the jobs will run one after the other

    My concern here is the view is going to to a invalid state after processing some of the jobs and it is getting failed for the next job.

    When we re-run the job it is working fine.

    i need to run these all jobs in a single stretch without going VIEW as a INVALID.

    can we have a script here to check the view after completing each and every job and execute the same to make sure the VIEW is VALID for the next job


    many thanks
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    if the view is invalid , it will not throw deadlock error .

    what are you doing in the job, is it performing any DML on the source of the view.

    Comment

    • AdusumalliGopikumar
      New Member
      • Aug 2007
      • 42

      #3
      Hi Debasisdas,

      Yes i am performing DML on the same.


      I have checked the object type in the DBA_OBJECTS where distinct output is VIEW,SYNONYM.

      Comment

      • debasisdas
        Recognized Expert Expert
        • Dec 2006
        • 8119

        #4
        after the completion of the job do not forget to commit, that will release the locks and finally compile the dependent views at runtime using EXECUTE IMMEDIATE.

        Comment

        Working...