SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Job with Database Command

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Job with Database Command
Author Message
laiko



Joined: 11 Feb 2010
Posts: 43
Country: India

Post Job with Database Command Reply with quote
I am evaluating 24x7 MP version and encountered this issue on a job which 'Execute Database command' options all checked (Job Start, Job Finished.. Late Job Start).

The command is simply:
INSERT INTO job_log (event_time, host, job_id, job_name, event_type) VALUES (sysdate, '@V"computer"', '@V"job_id"', ' @V"job_name"', '@V"event"')

and the job simply calls a procedure which basically does nothing:

begin
null;
end;

When I open the master and run the job, the record gets created in the job_log table with event_type = 'START'. After that, nothing happens. The log says 'Job Finished' but the Monitor shows the green arrow. I do not see any record for the 'finished/end' event type. When I run the job again, it hangs. The log says 'Job started' and no record in the job_log is created. It hangs. What can be wrong here? My job is 'Asynchronous' and 'Detached'.

Basically, my goal here is to know how the job is performing by logging its start/end times. But does 24x7 have such feature - a report showing the job's average elapsed times, performance, CPU usage and all.

I really hope you can help me out on this. There are few things I've been trying lately but could not accomplish.
Sun Feb 28, 2010 3:44 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7952

Post Reply with quote
You may have a locked table and a hung job waiting for the lock to be released. When you update/insert/delete, make sure you close your transactions (commit or rollback)
Sun Feb 28, 2010 6:21 pm View user's profile Send private message
laiko



Joined: 11 Feb 2010
Posts: 43
Country: India

Post Reply with quote
Ok, I changed my database command to:

begin
INSERT INTO job_log (event_time, host, job_id, job_name, event_type) VALUES (sysdate, '@V"computer"', '@V"job_id"', ' @V"job_name"', '@V"event"');
commit;
end;

When I restart the master, the job runs fine. It creates the record. When I rerun, it STILL hangs.
Can you give me an example? A very simple one which will insert records during 'Job Start', 'Job Finished' and 'Job Error'.
Mon Mar 01, 2010 6:20 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7952

Post Reply with quote
Please use some database monitor to find out why the job hangs on the database side.
Mon Mar 01, 2010 9:43 am View user's profile Send private message
laiko



Joined: 11 Feb 2010
Posts: 43
Country: India

Post Reply with quote
There are no locks or hanging transactions.
Tue Mar 02, 2010 3:13 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7952

Post Reply with quote
Please enable tracing option in Tools->Options menu; Log tab. and rerun this job. Let's take a look at what is recorded in jdbc.log and debug.log files. Please post the content of these files. If you find any sensitive data in these logs, like IP address or password, mask them with some symbols before posting.
Tue Mar 02, 2010 8:54 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.