Page 1 of 1

Job Locked

Posted: Mon Mar 02, 2009 2:20 pm
by reachmexyz
Hi All

I was working on Datastage and suddently my system shuts off.
This makes the Datastage job which was opened to be locked.
Again when i restart and try to open the job it says
" job was already opened by another user"
I checked the clean up resources and there are no resources found for that job.
I cleared status file. I checked for any process existing on UNIX.
Nothing worked.
But when my admin deletes the log on server it works.
How can view the log on server and delete (instead of admin).
What else can i do from Datastage Canvas?

Appreciate your answers

Re: Job Locked

Posted: Mon Mar 02, 2009 2:28 pm
by bollinenik
Hi,
You can find by using DS command "DSTOOLS", there you can see all the options to view the locks and clear the locks.
But still you need dsadmin previliges this can be done through DSadmin client or UNIX, there you can see all information about jobs.
Actually some times in your case it takes some more time to unlock itself, in the sense, If you try to open after some time then it might work.

Posted: Mon Mar 02, 2009 3:18 pm
by chulett
Suggest you check closer next time from the 'Clean up resources' tool. Don't always expect to find your job name there, sometimes all you'll find is a reference to one of the underlying objects by job number. For example, if there really was a process holding the job's log you would have seen a reference to an RT_LOGnnn object where nnn is your job's number.

If you're unsure how to know the internal number associated with a job, query the repository from the Administrator or a TCL prompt:

Code: Select all

SELECT JOBNO FROM DS_JOBS WHERE NAME = 'YourJobName';

Posted: Mon Mar 02, 2009 3:43 pm
by reachmexyz
chulett wrote:Suggest you check closer next time from the 'Clean up resources' tool. Don't always expect to find your job name there, sometimes all you'll find is a reference to one of the underlying objects by job number. For example, if there really was a process holding the job's log you would have seen a reference to an RT_LOGnnn object where nnn is your job's number.

If you're unsure how to know the internal number associated with a job, query the repository from the Administrator or a TCL prompt:

Code: Select all

SELECT JOBNO FROM DS_JOBS WHERE NAME = 'YourJobName';
I have executed the above command in a before stage subroutine of Transformer By picking EXEC TCL and typing the command to the right box of EXEC TCL.
I got the below error.
I am new to this TCL commands so may be i am doing wrong. Please help.
Also what are these TCL commands. Where can i find there Documentation

TCL..Transformer_0 (ExecTCL): Error when executing command: SELECT JOBNO FROM DS_JOBS WHERE NAME = 'pfr_21'
*** Output from UniVerse command was: ***
SQL

Posted: Mon Mar 02, 2009 3:48 pm
by chulett
As noted, simplest to run it from the Adminstrator client - Projects / select the project / Command, then input the SQL as the 'Command' and click 'Execute' to run it.

Posted: Mon Mar 02, 2009 3:58 pm
by reachmexyz
chulett wrote:As noted, simplest to run it from the Adminstrator client - Projects / select the project / Command, then input the SQL as the 'Command' and click 'Execute' to run it.
Thanks Very much.
Its working from Administrator and i can see the number.
This arousing interest on TCL commands.
Can you please tell me how can know about these commands?

Posted: Mon Mar 02, 2009 4:52 pm
by ray.wurlod
The command that failed is SQL and requires a terminating semi-colon.

Posted: Mon Jan 25, 2010 3:00 pm
by Vineet Pal Singh
Hi,

I also faced the same problem sometime back. The other way around is to kill the job from Unix. Run the below two commands in Unix and you will be able to access your job again.

ps-eaf|grep (UserId)
kill-9 (JobId)

UserId- This will be your user id for the application.
JobId- This can be fetched from Datastage Director. You will be able to see a 4 digit code being referenced infront of your job name. This is JobId.

Posted: Mon Jan 25, 2010 3:29 pm
by ray.wurlod
NEVER use kill -9 as the first choice to terminate DataStage processes.

Posted: Mon Jan 25, 2010 4:02 pm
by chulett
Always best to fully understand the things you are suggesting and a "-9" kill signal should never be on the top of anyone's list of Things To Try. :wink:

Posted: Fri Apr 02, 2010 12:29 pm
by Vineet Pal Singh
Ray/Chulett,

Kill -9 should be last option to kill the job. :)