Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: Trigger Detecting "View List is locked"
Topic Summary:
Created On: 12-Jan-2004 19:54
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
Answer This question was answered by Michael Sutherland, on Thursday, January 15, 2004 5:00 PM

Answer:
Pete,

The attached code is what I use to detect View Locks via DXL. It could be incorporated as part of a Module open trigger, which could be made to send an email to an admin, or write to a log file or a conf file. I use the code as part of a larger scanning routine to check the database.

I do not know of any way to delete a View Lock via DXL.

If you develop a complete solution, please let us know.
 12-Jan-2004 19:54
User is offline View Users Profile Print this message


Pete Kowalski

Posts: 301
Joined: 7-Feb-2003

Hi All -

I am curious if this is all indeed possible since I haven't seen any information on this. Using a trigger is it possible to detect that a view list is locked within a module??

Thanks in advance,
Pete

-------------------------
pete.kowalski(at)motorola.com
Report this to a Moderator Report this to a Moderator
 12-Jan-2004 22:15
User is offline View Users Profile Print this message


Michael Sutherland

Posts: 248
Joined: 13-Sep-2002

Answer Answer
Pete,

The attached code is what I use to detect View Locks via DXL. It could be incorporated as part of a Module open trigger, which could be made to send an email to an admin, or write to a log file or a conf file. I use the code as part of a larger scanning routine to check the database.

I do not know of any way to delete a View Lock via DXL.

If you develop a complete solution, please let us know.

-------------------------
Michael Sutherland
michael@galactic-solutions.com
http://galactic-solutions.com
Report this to a Moderator Report this to a Moderator
 15-Jan-2004 17:00
User is offline View Users Profile Print this message


Pete Kowalski

Posts: 301
Joined: 7-Feb-2003

Thanks Michael.

This is what I am thinking about your request. Have a trigger detect a lock list and when the flag is raised the script will invoke a perl script that will go on the file system to remove the lock list automatically. I am unsure how exactly the lock list is removed but I am thinking it is something on the file system.

-------------------------
pete.kowalski(at)motorola.com
Report this to a Moderator Report this to a Moderator
 16-Jan-2004 14:20
User is offline View Users Profile Print this message


Michael Sutherland

Posts: 248
Joined: 13-Sep-2002

Pete,

Inspired by your idea, and using my code snippet above, I went ahead and tested a trigger based view lock detector, which sends an email when someone opens a module and detects a situation where the views are locked.

It did detect stale view locks, but it is also detecting what I believe are legitimate view locks. View locks exist for a reason, but I'm not sure what events cause them to be created and deleted. I believe stale view locks are sometimes created when a DOORS client crashes.

So, I wouldn't recommend automatically deleting a view lock file every time one is detected, unless you are sure it is stale. The error message returned does contain a date and time stamp for the view lock, so that might be the key to determining when a view lock file can be deleted.

-------------------------
Michael Sutherland
michael@galactic-solutions.com
http://galactic-solutions.com
Report this to a Moderator Report this to a Moderator
 19-Jan-2004 21:01
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

You need to manually remove the lock file in question. In the module with the locked views, Tools Menu >> Edit DXL, type and run the following:
string ID = uniqueID(module(fullName(current Module)))
print ID "\n"

That will print an 8-digit Hex number (padded with zero) such as "00001AF5". That's the id of the module in the DB. Now go to the folder housing the Database (on the server). The IT folk will no doubt know where to start looking, but if they do NOT then tell them to run system program "regedit.exe" on the server, go to \HKEY_LOCAL_MACHINE\SOFTWARE\Telelogic\DOORS_Server\7.0\Config and get the file location from variable "ServerData".

Select the DB root file system folder in Windows Explorer and "search" for a folder named "m00001AF5.mod". Then go to sub-folder "Views". Inside you'll see a few to several files. One is the lock file in question, but sorry I don't recall its exact name. Its easy to spot, probably "lock.lck" or "views.lck". Rename this file to something like "views.lck.old". Now open the module in DOORS (if its open then close it and reopen it) and see of the views are unlocked. If they are, then delete the renamed file. If not, rename the file back and start cussing me out.

Don't tell Telelogic you've monkey'd in the DB.

- Louie

Once you you've done this manualy successfully, you can write some pearl script that starts from the DB root, searches for files named "\Views\Views.lck" (or whatever the file name is), and deletes them all.
Report this to a Moderator Report this to a Moderator
 28-Jan-2004 15:37
User is offline View Users Profile Print this message


Douglas Zawacki

Posts: 97
Joined: 14-Aug-2003

Louie,

FYI, the name of the file is lock.dtc. I have run into this situation again yesterday. It's happens about once a month around here.

Edited: 28-Jan-2004 at 16:36 by Douglas Zawacki
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.