Link to home
Start Free TrialLog in
Avatar of ebi168
ebi168

asked on

Procedure hanging

Hi,

I got a procedure that hangs on the production server but runs ok on the development server. The procedures are exactly the same. Could anyone tell me what is going on. Thanks
Avatar of ggridley
ggridley

You could have a lock.  Check out this link for how to find out if there are any locks:

https://www.experts-exchange.com/questions/21787127/ORA-00054-resource-busy-and-acquire-with-NOWAIT.html
Avatar of ebi168

ASKER

let me see...
ASKER CERTIFIED SOLUTION
Avatar of Harish_Rajani
Harish_Rajani

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ebi168

ASKER

After I killed the session, the locks are all gone, os process is also gone. So I don't know if performance might be one issue. It is however pretty quick last week.
Avatar of ebi168

ASKER

The other thing is if I schedule this procedure as a job in toad, the TOTAL_TIME parameter(which means the number of times the job has been executed), is growing like wild fire. In a minute it grows to over 100 times, and the FAILURES parameter is always empty (which should be 0 if last time is successful; or a number indicating times of failure)
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ebi168

ASKER

From my monitoring total_time increment by 1 after each run; any suggestion on what DBMS_OUTPUT statement to put there?
Avatar of ebi168

ASKER

Maybe you are right total_time is the seconds.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ebi168

ASKER

I however suspect, it must be a bulk update query on the table which inturn has a trigger (on update) such that causing  a recursive lock.

--There is something related to trigger, but I don't know if it is causing the problems. I am trying to load one table which has triggers to insert into a table on Monday morning, say T1. It is taking so long that I eventually killed it. This procedure is a scheduled job at that time(every 2 hours). It uses records in T1 to put into another table (insert into T2 select ...from T1...). So trigger and procedure could possible happened at the same time. Then I noticed the failures for the job is 3. So I dropped the job, then things are like what is now.
Avatar of ebi168

ASKER

I also rescheduled the job, it got completed but with failures. Again the same thing is fine on the development server.
Avatar of ebi168

ASKER

Now it looks like hanging again.
Avatar of ebi168

ASKER

Thanks for all your comments. I find out that it is a performance issue.