Cannot get exclusive access to executable file for job

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

HSBCdev
Premium Member
Premium Member
Posts: 141
Joined: Tue Mar 16, 2004 8:22 am
Location: HSBC - UK and India
Contact:

Cannot get exclusive access to executable file for job

Post by HSBCdev »

I stopped a job using the the button in Designer and then cleaned up its resources but now I cannot recompile (or delete) the job.

When I try to recompile I get the message 'Cannot get exclusive access to executable file for job <Jobname> - job may be being monitored '



I have tried cleaning up the resources and clearing the status file through designer many times but it doesn't seem to be helping.

I have also tried going into Administrator and running DS.TOOLS -> 5 - 'Administer/process locks' -> 11- 'Clear Status file for a job' but this has also not helped.

Could you advise me either how to get my job working and compilable again or how to delete the job (I've made a copy of it which I can rename back to the original name once the dodgy versions out of the way).

Thanks
WoMaWil
Participant
Posts: 482
Joined: Thu Mar 13, 2003 7:17 am
Location: Amsterdam

Post by WoMaWil »

Try to restart DataStage if you can. Maybe that this will help. Wait 5 Minutes before restarting DataStage.
HSBCdev
Premium Member
Premium Member
Posts: 141
Joined: Tue Mar 16, 2004 8:22 am
Location: HSBC - UK and India
Contact:

Post by HSBCdev »

Thanks - I'll see if I can get permission to do that.
anupam
Participant
Posts: 172
Joined: Fri Apr 04, 2003 10:51 pm
Location: India

Post by anupam »

Code: Select all

I have also tried going into Administrator and running DS.TOOLS -> 5 - 'Administer/process locks' -> 11- 'Clear Status file for a job' but this has also not helped.
When you are in DS.TOOLS and you have opted 11 option for Clearing the status file and then provided the Job Name, then once datastage has cleared the file name , it shows a mesage stating that the RT_CONFIGNNN file has been cleared where NNN is the Job Number.

Note down this Job Number are choose option 4 for listing all the locks, You will find that the RT_CONFIGNNN is in lock state. Note down the pid

Now choose option 7 and provide the pid for releasing the lock of RT_CONFIGNNN File.

And your problem will be solved.

Basically, you have to follow three steps in these type of cases.
1. Clear Status File and note down the Job Number. Check if you could
get the exclusive rights. If not, then
2. Using that job number, see all the locks and note down the pid for
RT_CONFIGNNN.
3. Choose option 7 for Clear locks held by a process and provide the pid.
----------------
Rgds,
Anupam
----------------
The future is not something we enter. The future is something we create.
HSBCdev
Premium Member
Premium Member
Posts: 141
Joined: Tue Mar 16, 2004 8:22 am
Location: HSBC - UK and India
Contact:

Post by HSBCdev »

Thanks I have tried that (since I was not able to get DataStage stopped and restarted). After a few goes through your technique and also killing all my jobs through unix command I found that I could recompile my jobs again.

However, now when I run my sequence It calls its first job but when it the 1st job has finished (and then sequence is then supposed to call a second instance of the 1st job) the sequence still waits for the 1st instance of the 1st job to finish - even though when I look in director the status of the 1st instance of the 1st job is 'finished' and there have been no warnings/errors.

My sequence just hangs - I tried killing of all my jobs again and then trying the sequence again but the same thing has happened? The sequence and jobs have not been changed since they were succesfully run earlier last week. The problems seem to have started when I tried to stop the sequence running through Director after I had mistakenly set it running on a very large file.

Any ideas?
anupam
Participant
Posts: 172
Joined: Fri Apr 04, 2003 10:51 pm
Location: India

Post by anupam »

Two things you should do
1. Kill all the processe of all the Jobs attached to that sequencer/Applications from unix level and then clear the status files and RT_CONFIGNNN files for each of the Jobs.
2. You should check whether the log as seen from the director log is taking long time to be reflected, if Yes then that means your log file has grown large and it needs to be purged. Clear the logs prior to say 2 days.

The top level sequencer should not wait for any Job. You might have not cleared all the Jobs ......

Check it out and let me know.
----------------
Rgds,
Anupam
----------------
The future is not something we enter. The future is something we create.
HSBCdev
Premium Member
Premium Member
Posts: 141
Joined: Tue Mar 16, 2004 8:22 am
Location: HSBC - UK and India
Contact:

Post by HSBCdev »

For one of my jobs when I try to view the log Director seizes up - (I eventuallly did an 'end task' on it). This also happens when I try to clear the log for that job. Is this my problem then?

Is there another way I can clear the log for this job?

Thanks
anupam
Participant
Posts: 172
Joined: Fri Apr 04, 2003 10:51 pm
Location: India

Post by anupam »

So that means we got the problem. Now the problem is the bigger log file associated with that Job. you can clear the logs without going to the LOG view.

Open your director, then choose Job option from the menu bar and opt for Clear log.

Once you have cleared the log, your waiting problem will also be solved.

let me know the results.
----------------
Rgds,
Anupam
----------------
The future is not something we enter. The future is something we create.
HSBCdev
Premium Member
Premium Member
Posts: 141
Joined: Tue Mar 16, 2004 8:22 am
Location: HSBC - UK and India
Contact:

Post by HSBCdev »

I'd already tried that - it also just hangs. I've left that going in director for the last 15 minutes. Is it likely that it's still clearing the log - or has it hit a problem?

Is there anyother way to clear the log?

Thanks
ogmios
Participant
Posts: 659
Joined: Tue Mar 11, 2003 3:40 pm

Post by ogmios »

HSBCdev wrote:I'd already tried that - it also just hangs. I've left that going in director for the last 15 minutes. Is it likely that it's still clearing the log - or has it hit a problem?

Is there anyother way to clear the log?

Thanks
Export the job and reimport it again. Internally DataStage will delete all information based on the old job number and will generate you a new fresh job number and new directories/files.

Ogmios
HSBCdev
Premium Member
Premium Member
Posts: 141
Joined: Tue Mar 16, 2004 8:22 am
Location: HSBC - UK and India
Contact:

Post by HSBCdev »

I tried to import the jobs back in - but some of the jobs were locked again (maybe this was due to me ending the task that was trying to clear the log?). I've been trying the techniques above to remove these locks again but I'm having no sucess. I'll keep trying and let you know when I've got them unlocked again.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

anupam wrote:Two things you should do
1. Kill all the processe of all the Jobs attached to that sequencer/Applications from unix level and then clear the status files and RT_CONFIGNNN files for each of the Jobs.
2. You should check whether the log as seen from the director log is taking long time to be reflected, if Yes then that means your log file has grown large and it needs to be purged. Clear the logs prior to say 2 days.

The top level sequencer should not wait for any Job. You might have not cleared all the Jobs ......

Check it out and let me know.
Never, never, never clear the RT_CONFIGnnn files !!!!!

These contain the run-time configuration of the job design. They are not affected by the job run itself.

However, clearing them is a great way to ensure that the job will never run again! (Until it is re-compiled, one effect of which is to re-populate the RT_CONFIGnnn file.)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
anupam
Participant
Posts: 172
Joined: Fri Apr 04, 2003 10:51 pm
Location: India

Post by anupam »

Code: Select all

the status files and RT_CONFIGNNN files for each of the Jobs
I wrote it incorrectly, By clearing RT_CONFIGNNN, i meant unlocking RT_CONFIGNNN.

It has mentioned in my first reply also to unlock the RT_CONFIGNNN by choosing option 7, and giving the pid of RT_CONFIGNNN.

You should not clear any of the files which starts with RT* as these are having the run time information.
----------------
Rgds,
Anupam
----------------
The future is not something we enter. The future is something we create.
HSBCdev
Premium Member
Premium Member
Posts: 141
Joined: Tue Mar 16, 2004 8:22 am
Location: HSBC - UK and India
Contact:

Post by HSBCdev »

I'm ok - I was following the original instructions and unlocking the file.

I've now got to the stage were I can recompile all my jobs (before I was getting a message saying that I couldn't get exclusive access to the executable). I still cannot clear the job log for one of my jobs though.

I've tried Ogmios's suggestion of exporting and importing the job but I get the message 'Cannot get exclusive access to log for job MyJobName'. I presume that this is because I Director seized up when I originally tried to clear the job log.

Do you know how I can get rid of the lock on the job log ?

Thanks
anupam
Participant
Posts: 172
Joined: Fri Apr 04, 2003 10:51 pm
Location: India

Post by anupam »

Open the director, it would be the status window.if not then select the 3rd icon from left (next to print Option).

press (alt+j+c), you will get a GUI opt for Immidiate purge and specify the dates from when you want to purge the records.

This is the simple way of deleting the log entries.

If you are still not able to delete the log entriee then let me know.
It may take some time. Don't close the director if it hangs for some time. Leave it after choosing the option for some time, it will come back.....
----------------
Rgds,
Anupam
----------------
The future is not something we enter. The future is something we create.
Post Reply