Page 1 of 2

Unable to unlock jobs in v8

Posted: Thu Oct 30, 2008 10:56 am
by bcarlson
We are having increasing problems with locked jobs in v8.0.1.
Unable to open the Job.

The Job 'dly_ddatran_dtl_src_import' is locked by user 'carlb0x'
(SessionID '36642854-233B-4B1F-AAE5-49DDC6FB3A84)
The process we used in the past with v7 does not appear to work, at least not consistently:
  • 1. Open DS Director and go to Job/Cleanup Resources
    2. Click 'Show All' in the Processes window and select the userid in question.
    3. Click the 'Show by Process' in the Locks window to see what project is affected by the user process
    4. Repeat steps 2 and 3 until you identify the process that holds the lock for you project/job. When you find the process that touches the project in question, click Release All.
    5. Reselect the process in the Processes window and click Logout.
    6. Click Refresh and validate that the process has been removed.
This has worked consistenly in v7, but not so well in v8. As I understand it, there is a session manager of some sort on the Web app, right? What permissions/roles are needed for a user to unlock jobs/sessions from there? What are the steps required to unlock it? The reason I ask is that it seems there is a specific order in v7 to release them correctly, do we have a similar situation in v8?

If there is a good reference in the documentation, let me know.

Thanks!

Brad

Posted: Thu Oct 30, 2008 11:00 am
by ray.wurlod
Go to the Web Console for Information Server. On the Adminstration tab open the twisty for Session Management and choose Active Sessions. In the grid on the right find the session ID from the error message and select that session via its option button. Then, in the menu on the right, choose Disconnect to disconnect that particular session, if you are sure that it is no longer an active session. This will also release any locks held by that session.

Posted: Thu Oct 30, 2008 12:29 pm
by bcarlson
Hmmm... I tried that and I can see other sessions, but I cannot find the one in question. I checked on Unix and all of my sessions are gone.

What do we do if we can't find the session? Did my initial steps screw it up, or is there something else going on?

Is this the only way to remove locked jobs? The reason I ask is that in v7, the owner of a session could release their own lock via Director and the steps I listed before. It looks like this method requires admin access. Or can anyone do it, but they can't affect someone elses sessions?

Questions, questions, questions. :)

Brad.

Posted: Thu Oct 30, 2008 12:33 pm
by bcarlson
Never mind, answered part of my own question. I logged in with an id that did not have the admin rights and could not even see the session mangement option. :(

With more and more developers on our system, I don't want to have to have someone on call just to unlock jobs. How have other shops managed this? A few people onshore and few offshore with admin access to fix this?

Brad

Posted: Thu Oct 30, 2008 2:19 pm
by ray.wurlod
Would you like to experiment with the product role DataStage Administrator (issued from Web Server Console) to see whether this user can release locks relating to DataStage or whether one needs to be a suite administrator? I'm on a single user system at the moment, and don't really have the time to set up locking scenarios.

Posted: Thu Oct 30, 2008 4:28 pm
by bcarlson
I'll need to do some experimenting later. We have some other issues going on and have had to bounce our server and apply some OS patches. But get this - the whole Unix server was bounced and DS was brought back up and the job is STILL locked. That doesn't make sense...

Brad

Posted: Thu Oct 30, 2008 4:51 pm
by chulett
Isn't that because the "locks" are records in the XMETALOCKINFO database table?

Posted: Thu Oct 30, 2008 5:15 pm
by lstsaur
Yes exactly. In my shop I have a DB trigger to clean them up automatically.

Posted: Thu Oct 30, 2008 5:55 pm
by bcarlson
lstaur - Can you pass on the trigger?

All, we did finally get the jobs unlocked thanks to the cleanup_abandoned_locks.sh program (see Adding new Folders in a new Project impossible).

Does anyone know what this program actually does? We'd love to understand it better - may give us insight into how to reduce or prevent the locking to begin with.

Brad.

Posted: Thu Oct 30, 2008 11:48 pm
by lstsaur
Brad,
Didn't you say that you don't want to have someone on call just to unlock jobs? You need to utilize the database triggers to do the "unlock jobs" on 24x7 automatically.

Posted: Thu Nov 06, 2008 12:14 pm
by bcarlson
What triggers? Are these triggers that you or your DBA created or do they come with DataStage/WAS? I think this is exactly what we need, but I am not sure where to find the details about the triggers. Can you point us in the right direction?

Thanks!

Brad

Posted: Thu Nov 06, 2008 12:38 pm
by toshea
Locks are stored in the XMETALOCKINFO table. When a session terminates cleanly, the locks belonging to that session are removed from the XMETALOCKINFO table. If a session is not terminated cleanly because you killed the Designer client or the whole server went down without shutting down the WAS cleanly, then locks remain in the XMETALOCKINFO table that belong to sessions that no longer exist. The cleanup_abandoned_locks.sh script checks for locks that don't belong to active sessions and it removes them.

Posted: Thu Nov 06, 2008 1:35 pm
by lstsaur
Brad,
Triggers don't come with IIS. It seems like that you don't have the authority to create the triggers. Then, you should work with your Oracle DBA to create this trigger for you.

Posted: Thu Nov 06, 2008 3:00 pm
by bcarlson
Do you have copies of the triggers that you can post or send to me or pseudo-code? I am guessing I am not the only one interested in those!

We are using DB2 for our repository. We can convert them as needed, and I can forward it to our DBA group.

Thanks!

Brad.

Posted: Thu Nov 06, 2008 6:59 pm
by lstsaur
Brad,
Show the following trigger (Oracle) to your DB2 DBA:

CREATE OR REPLACE TRIGGER TRIG4Brad
AFTER INSERT
ON XMETA.XMETALOCKINFO
BEGIN
DELETE FROM XMETA.XMETALOCKINFO;
END TRIG4Brad;
/