Connecting Tech Pros Worldwide Help | Site Map

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

AdusumalliGopikumar's Avatar
Member
 
Join Date: Aug 2007
Location: india
Posts: 43
#1: Jan 27 '09
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's Avatar
Moderator
 
Join Date: Dec 2006
Location: Bangalore ,India
Posts: 7,497
#2: Jan 27 '09

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


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.
AdusumalliGopikumar's Avatar
Member
 
Join Date: Aug 2007
Location: india
Posts: 43
#3: Jan 27 '09

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


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.
debasisdas's Avatar
Moderator
 
Join Date: Dec 2006
Location: Bangalore ,India
Posts: 7,497
#4: Jan 27 '09

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


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.
Reply