Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic System Architect (steve huntington)
Decrease font size
Increase font size
Topic Title: Unlocking objects after SA crashes
Topic Summary: Unlocking objects after SA crashes
Created On: 8-Jun-2006 21:39
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
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.
 8-Jun-2006 21:39
User is offline View Users Profile Print this message


Marcel Mayrand

Posts: 1
Joined: 8-Jun-2006

Hi!

I am using an Oracle based encyclopedia. After an SA crash, a number of objects were left marked as in use by myself and I cannot update them anymore. I did not find any obvious way to unlock them with SA, but It looks like I could do this with encyclopedia manager. However, Encyclopedia manager does not allow me to unlock the objects as Encyclopedia Manager believes (incorrectly) that the encyclopedia is used by someone else.

Any idea?

Thanks,
Marcel (new to SA)
Report this to a Moderator Report this to a Moderator
 9-Jun-2006 19:26
User is offline View Users Profile Print this message


Theodore Menard

Posts: 70
Joined: 1-Aug-2005

Highlight the locked objects. Right mouse click select "Access Control" from the pull down select "unlock" (it's usually the default). That should unlock the diagrams. 

-------------------------
Theodore A. Menard
Report this to a Moderator Report this to a Moderator
 12-Jun-2006 09:13
User is offline View Users Profile Print this message


Ed Fletcher

Posts: 4
Joined: 13-Jan-2004

Hi Marcel

this sounds like you are not set up as administrator for your system.

To do this you need to rename SABind1.dll to SABind.dll. Be careful to rename your existing SABind.dll to something else so you can rollback to your original state if necessary.

This should then allow you to unlock items which have been locked in a crash situation.

Ed
Report this to a Moderator Report this to a Moderator
 16-Jun-2006 09:55
User is offline View Users Profile Print this message


Christine anderson

Posts: 9
Joined: 15-Sep-2005

You don't need to change your SABIND to unlock objects that you have locked yourself - only if you want to unlock others and to freeze/unfreeze
Report this to a Moderator Report this to a Moderator
 22-Jun-2006 03:27
User is offline View Users Profile Print this message


Duane Hennessy

Posts: 112
Joined: 18-May-2006

Overnight I run a routine that unlocks all definitions and diagrams within an SA encyclopedia. I use this because there are occasions where users have locked objects within SA and by the time anyone finds out the objects are locked, the user who locked them has moved on.

Here are my procedures that I run as jobs to unlock all diagrams and definitions within encyclopedias when there are no users connected to System Architect. I'm going to write an iterative routine so it will walk through all SA databases without having to have a separate job for each Encyclopedia. Hope these are of use to SA/SQL Server Admins.


To unlock all diagrams:

-- Author: Duane Hennessy
-- Company: CorpTech, Technology Strategy & Infrastructure
-- Date: 8/05/2006, 2:20 PM
-- Description: Unlock all diagrams within System Architect
-- Notes: notes_here
if cast(master.dbo.sas_system_architect_active() as varchar(8)) != '1'
begin
update entity set ToArrow = 0
where entity.ToArrow = 1 and
entity.Class = 1
end


To unlock all defintions:

-- Author: Duane Hennessy
-- Company: CorpTech, Technology Strategy & Infrastructure
-- Date: 8/05/2006, 2:20 PM
-- Description: Unlock all definitions within System Architect
-- Notes: notes_here
if cast(master.dbo.sas_system_architect_active() as varchar(8)) != '1'
begin
update entity set ToArrow = 0
where entity.ToArrow = 1 and
entity.Class = 3
end


The sas_system_architect_active() SQL Server function is:

-- Author: Duane Hennessy
-- Company: CorpTech, Technology Strategy & Infrastructure
-- Date: 9/05/2006, 9:42 AM
-- Description: Returns a boolean value of true if the System Architect
-- application is found to exist within the sysprocesses table.
-- The result tells us whether there are users connected to
-- a System Architect Encyclopedia (database and schema).
-- Notes: This function was created so that the series of symbol
-- unlocking steps within a SQL Server job could be cancelled
-- where unlocking the symbols and definitions would adversely
-- affect a user's work.
-- Dependencies: SQL Server Job 'System Architect Overnight Unlock'

CREATE FUNCTION sas_system_architect_active ()
RETURNS bit
AS
BEGIN
DECLARE @active aS bit
DECLARE @count as int

select @count = count(spid) from sysprocesses procs
where nt_username <>''
and program_name = 'SA'

if @count > 0
begin
set @active = 1
end
else
begin
set @active = 0
end

RETURN @active
END



Edited: 22-Jun-2006 at 04:33 by Duane Hennessy
Report this to a Moderator Report this to a Moderator
 31-Jul-2008 16:07
User is offline View Users Profile Print this message


Toby Chaloner

Posts: 29
Joined: 22-Aug-2007

In a rather Nieve fashion, with the proviso that All the locks were left by the current user and the encyclopaedia is a professional one - this seems to work. I am unclear why the setField does not need a save, if I don't do the SetField the 'stuck' lock does not clear. This VBA macro does not check who has the lock.

Private Sub unlockMyLocks()
Dim def As Definition
Dim objects As SAObjects
Set objects = Application.Encyclopedia.GetFilteredDefinitions("*", DFXOOUSECASE)
Call objects.ReadAll
For Each def In objects
'Debug.Print def.Locked
Debug.Print "audit id", def.GetField(DEFNFLD_SAAUDITID)
Debug.Print "locked", def.GetField(DEFNFLD_SALOCK)
def.SetField DEFNFLD_SALOCK, "F"
'Debug.Print def.Locked
Set def = Nothing
Next
End Sub
Report this to a Moderator Report this to a Moderator
 5-Aug-2008 22:49
User is offline View Users Profile Print this message


Michael Martines

Posts: 3
Joined: 14-Apr-2008

Did you ever resolve this?
Report this to a Moderator Report this to a Moderator
 22-Aug-2008 14:56
User is offline View Users Profile Print this message


Toby Chaloner

Posts: 29
Joined: 22-Aug-2007

Michael
Not sure which post / issue you are referring to?
Regards
Toby
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic System Architect forum.
There are currently 1 users logged in.
The most users ever online was 16 on 30-Oct-2008 at 14:46.
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.