Page 1 of 2

kill job using job id

Posted: Fri Mar 24, 2006 6:26 am
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,

Re: kill job using job id

Posted: Fri Mar 24, 2006 6:28 am
by vimalvik
hi,
is there any options available in DS to kill jobs.

Posted: Fri Mar 24, 2006 6:42 am
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? :?

Posted: Fri Mar 24, 2006 6:44 am
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'.

Posted: Wed Apr 05, 2006 12:56 pm
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.

Posted: Wed Apr 05, 2006 2:15 pm
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

Posted: Wed Apr 05, 2006 3:31 pm
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.

Posted: Thu Apr 06, 2006 7:13 am
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.

Posted: Thu Apr 06, 2006 7:23 am
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:

Posted: Fri Apr 07, 2006 5:13 am
by sendmk
is jobid equal to pid

:?

thx

Posted: Fri Apr 07, 2006 5:19 am
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.

Posted: Fri Apr 07, 2006 5:22 am
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

Posted: Fri Apr 07, 2006 5:24 am
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

Posted: Fri Apr 07, 2006 7:17 am
by ArndW
Add a ";" so that the engine knows that it is supposed to be a SQL query.

Posted: Sun Apr 09, 2006 10:40 pm
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