Job Locked

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

Post Reply
reachmexyz
Premium Member
Premium Member
Posts: 296
Joined: Sun Nov 16, 2008 7:41 pm

Job Locked

Post 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
bollinenik
Participant
Posts: 111
Joined: Thu Jun 01, 2006 5:12 am
Location: Detroit

Re: Job Locked

Post 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.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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';
-craig

"You can never have too many knives" -- Logan Nine Fingers
reachmexyz
Premium Member
Premium Member
Posts: 296
Joined: Sun Nov 16, 2008 7:41 pm

Post 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
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
reachmexyz
Premium Member
Premium Member
Posts: 296
Joined: Sun Nov 16, 2008 7:41 pm

Post 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?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The command that failed is SQL and requires a terminating semi-colon.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Vineet Pal Singh
Participant
Posts: 21
Joined: Mon Mar 16, 2009 3:59 am

Post 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.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

NEVER use kill -9 as the first choice to terminate DataStage processes.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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:
-craig

"You can never have too many knives" -- Logan Nine Fingers
Vineet Pal Singh
Participant
Posts: 21
Joined: Mon Mar 16, 2009 3:59 am

Post by Vineet Pal Singh »

Ray/Chulett,

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