kill job using job id

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

vimalvik
Premium Member
Premium Member
Posts: 19
Joined: Tue Feb 21, 2006 5:56 am
Location: India

kill job using job id

Post by vimalvik »

hi all,
i wud like to kill my job using kill cmd.
i tried to kill the job but cudn succeed.
is there any other to way


thanks in advance,
vimal.R
vimalvik
Premium Member
Premium Member
Posts: 19
Joined: Tue Feb 21, 2006 5:56 am
Location: India

Re: kill job using job id

Post by vimalvik »

hi,
is there any options available in DS to kill jobs.
vimal.R
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Well, there's always the 'Stop' button in the Director. Other than that there's the operating system which can be used to end any process your have the permissions to put down. On UNIX that would be the 'kill' command against the appropriate PID.

Tell us what "i tried to kill the job but cudn succeed" means. What exactly did you try? What didn't work about it? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

What you mean by 'kill'.
Do you want to delete or want to stop the process or need to release the lock?
If you are speaking about releasing the lock based on the job id, select the job name from the job id by executing SELECT NAME FROM DS_JOBS WHERE jobid = 'nnn' from TCL and after retreving the job name, you can got to director Jobs--->Cleanup Resource.
Click on Show All on the Locks tab and process.
Pick up the PIC for the job from the process tab, and select the PID on the Locks tab and click on 'Release All'.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
mujeebur
Participant
Posts: 46
Joined: Sun Mar 06, 2005 3:02 pm
Location: Philly,USA

Post by mujeebur »

I tried killing of the Job from UNIX command line promt using PID. But the job did not stop and didn't run either. It just hanged out there. Later I realized that , we SHOULD not kill the job like so in DS.

You could stop the job via Director or Stop via DS Administrator.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

If the job is hanging, then probably you want to unlock it. If thats what you are looking for then :
1. Goto the Datastage Adminstrator ( if you are privelaged) and login to the project.
2. Select the Project and click Command button.
3. Type in LIST.READU to list all the process.
4. Then type DS.Tools and enter option 4 and then option 7.
5. Enter the PID for the job to be unlocked.
6. You are done :D
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

A DataStage parallel job consists of many processes - there is a conductor process, a section leader process on each processing node, and player processes on each processing node. Just from that description you should appreciate that kill is not the best way to stop a job - how could you be sure that you'd identified all the processes in the job?

That's why tools like Cleanup Resources and the DS.TOOLS menu exist.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

I would also like to add. If your job includes loading into a table and you want to stop that job, the best way is to just ask the DBA to kill your thread. That will send a connection lost message to your job and it will hance abort. IMHO, that is one of the best ways to handle hanged jobs (which includes loading a table). This also avoids any runway threads that might still be actively running even though the job was stopped or killed.
my 2 cents.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I agree. Too many times stopping or killing the DS process leaves the database process joyfully continuing on it's merry way. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
sendmk
Charter Member
Charter Member
Posts: 136
Joined: Mon Oct 03, 2005 5:02 am

Post by sendmk »

is jobid equal to pid

:?

thx
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

No, the jobid and UNIX pid are not the same. It think in some places the pid is displayed, but DataStage has a another internal number for processes which is used, and the standard process-id and internal job id display in the PORT.STATUS command actually truncates long PIDs.
sendmk
Charter Member
Charter Member
Posts: 136
Joined: Mon Oct 03, 2005 5:02 am

Post by sendmk »

kumar_s wrote:SELECT NAME FROM DS_JOBS WHERE jobid = 'nnn' .
so could u tell me where can i find the jobid.

thx
sendmk
Charter Member
Charter Member
Posts: 136
Joined: Mon Oct 03, 2005 5:02 am

Post by sendmk »

i executed the below command in TCL but i get only an a blank screen with sql+ prompt
SELECT JOBID FROM DS_JOBS WHERE NAME = 'testsum' .
can anyone throw some light.

thx
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Add a ";" so that the engine knows that it is supposed to be a SQL query.
sendmk
Charter Member
Charter Member
Posts: 136
Joined: Mon Oct 03, 2005 5:02 am

Post by sendmk »

thx very much arndw

but
SELECT JOBID FROM DS_JOBS WHERE NAME = 'testsum'
gives
jobid.......

1 record listed.
i cant see the jobid, i wonder where can i see that information
Post Reply