TABLE GETS 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
nkln@you
Premium Member
Premium Member
Posts: 271
Joined: Wed Nov 17, 2004 5:15 am
Location: US

TABLE GETS LOCKED

Post by nkln@you »

I ran a batch job which had 3 update statements on a table A.
The execution of this job took more time than expected and so i i tried to stop th execution,but it did'nt stop and so i used clean up resources option.

then the status of the job was shown as compiled. but when i opened the log for that batch job, i could not see the job aborted or anything

I can only see
Batch::UpdateKey: Set NLS locale to US-ENGLISH,US-ENGLISH,US-ENGLISH,US-ENGLISH,US-ENGLISH


When i try to run those update statements manually again, i colud not see it get completed. i think the table is locked.


I have faced this type of problems many times. De to this my development time is increasing.

Pls suggest me what to do in such cases
Aim high
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You have not provided enough information.

What kind of table is Table A? (That is, what brand of database?) What leads you to believe that the table (which table?) is locked? Have you checked with your DBA, who can inspect locks?

What error/warning messages are being posted in the DataStage log? Do double click and get the full detail.

Did you try resetting the job? There may be more diagnostic information logged when you do this.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
davidnemirovsky
Participant
Posts: 85
Joined: Fri Jun 04, 2004 2:30 am
Location: Melbourne, Australia
Contact:

Post by davidnemirovsky »

Just a general comment regarding your post.

Sometimes during DS development incomplete jobs and processes that have incomplete or 'dodgy' code in them can lock tables and routines without unlocking them. When this happens to an internal Datastage component you can unlock it by telneting to the DS server and performing some administration with the dsadm user. If external tables are getting locked you will need to get your DBA to unlock the processes that are holding them.

If you do not realise that your tables/processes are locked this could lead to incorrect diagnosis of your errors.

Although this might not be the cleanest approach, we found (at the site I am currently on) that it was helpful to 'bounce' (reboot) the Datastage server or the Database server to make sure no locked tables or processes are causing a loss of time. We did this approx 2 or 3 times a week.
Cheers,
Dave Nemirovsky
chinek
Participant
Posts: 75
Joined: Mon Apr 15, 2002 10:09 pm
Location: Australia

Post by chinek »

Sometimes aborting a job does not necessarily kill off any SQL that the job has already initiated in the database so your update statements could still be executing. When you rerun the jobs then obviously those tables are locked by the earlier sql.
Best bet is to get your DBA to also check and kill of any updates sql running in your database before rerunning the jobs.

Nick
Post Reply