Book a Demo

Author Topic: How to unlock element table without lock-option in element context menu  (Read 20100 times)

karindeboer

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Hello,

I'm new here and I'm using EA for my work. I've encountered a for me unsolvable problem. I've made some tables and mysteriously one of them became locked, without me having locked that element in the element context menu. I read that somebody had the same problem and has unlocked the element in the DB Table of EA. But I have no idea how to do that. Does anyone have a solution for my problem?

Karin

Nizam

  • Prolab Moderator
  • EA User
  • *
  • Posts: 320
  • Karma: +15/-2
  • Model Sharing - Simplified
    • View Profile
    • Professional Model Collaboration
You can also try viewing locks from 'Manage Locks'  (Configure -> Locks (in Security)), if have rights for this, you can unlock the item

karindeboer

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Considering the red exclamation mark I think the two tables are locked as in locked by another user. I think the cause of the locking is that I encountered problems with my Citrix-remote EA-sessions. Our helpdesk has ended the connections in the Citrix Connection Centre. I think there are still sessions open on the server, which make that EA "thinks" that those tables are in use by another user (me).

EA-documentation (UML Model Management) says this about it:

Share Projects on Network Drive
The easiest way to share a project amongst a work group of developers and analysts is to place the project file
on a shared network drive and have people connect concurrently from their Workstation.
Note:
Enterprise Architect accepts a number of concurrent connections without issue, although there can be
occasional 'lock-outs' when one user tries to access or update something another user is in the process of
modifying.


I hope this is the information you're looking for. I've made images of the locked tables and the inactive option under Manage My Locks (all kind of locking-options are inactive), but don't know yet how to upload this to this post. It could give more information.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13505
  • Karma: +572/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
There is no automatic locking of used elements in EA.
Locking and unlocking is something you do manually, so this will not be caused by any Citrix issues.

The red exclamation indicates that another user has locked the elements.
You will not see those locks in the "Manage My Locks" dialog (shows only your locks), but you can remove the locks from the "Manage Locks" dialog (shows all locks).

Geert

karindeboer

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Hello Geert,

You write there is no automatic locking of used elements in EA, but I did not lock these elements on purpose. For that reason I can’t remember how to unlock them. And you’re right that a lockout means something different than putting a lock on an element..

The red exclamation indicates that another user has locked the elements, but I’m 99,99% sure that no other user is or has been working on this project. Therefore it’s still a mystery to me. You say I can remove the locks from the "Manage Locks" dialog (shows all locks). I have searched all menus for an unlock-option and could not find an active option. Can you yell me the path where I can find that option?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13505
  • Karma: +572/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Karin,

The option you are looking for is found at
Configure | Security | Locks (v14)
Project | Security | Manage Locks (v12)

see http://www.sparxsystems.com/enterprise_architect_user_guide/13.5/team_support/managelocks.html

But if security is not enabled, or there are no locks to be found in the Manage Locks dialog then you have a weird case.
The easiest way to solve it is to go into the database and remove the locks using an SQL query.

Locks are stored in the t_seclock table so a
Code: [Select]
delete from t_seclockWould do the trick.

Geert

karindeboer

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Hi Geert,
 
I'm working with Enterprise Architect 13.5. So the option to use is Configure | Security | Locks (v14). Security is not enabled. I found the option Configure | Security | Locks, but the option 'Locks' is inactive, so I can't choose that. In fact: all the options that have to do with locking are inactive. I guess I have, as you call it, a weird case...

I don't have administrator-rights on EA, so I will pass your information about the table where locks are stored in EA to our helpdesk. I hope they can manage to solve my problem that way.

Thanks for your help!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13505
  • Karma: +572/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Hi Karin,

In that case I guess you really have a curious case.

what you can quickly do to check if that is the problem is execute a query to find out if there are any locks in the system (although security is not turned on)
Go to the model search window, click on the edit button, select the SQL scratch pad and execute following query

Code: [Select]
select * from t_seclocks
If you have any results here then that is the culprit.
You can then write a little script to remove those locks from the database directly.

Geert

karindeboer

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
I ran the select statement but it returned 0 results. Maybe that's because I don't have administrator rights on the EA-database?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13505
  • Karma: +572/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
No, you don't need administrator access to query the table.

At this point I would contact Sparx support and have them look at it.

You can send an email to [email protected]

Geert

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: How to unlock element table without lock-option in element context menu
« Reply #10 on: March 28, 2018, 08:43:31 pm »
Hello Karin,

Please run
Code: (SQL) [Select]
select * from t_secpolicies
in your database and post the results.

/Uffe
My theories are always correct, just apply them to the right reality.

karindeboer

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: How to unlock element table without lock-option in element context menu
« Reply #11 on: March 29, 2018, 01:00:57 am »
Hello Uffe,

I've copied the sql in the SQL Scratchpad under Start -> Search -> Search in Model -> Find in Project. I got the reply: search returned 0 results. Could it be that the search is not "reaching" the EA-data itself but only the data generated in my project. I'm just a user of EA and not the administrator of EA.

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: How to unlock element table without lock-option in element context menu
« Reply #12 on: March 29, 2018, 02:09:08 am »
No, that means there is no user security configured in the project and (I'm pretty sure) there never has been. Meaning the locks shouldn't be there.

Access-wise, there's no limitation on what you can view through the GUI or select from the database, so checking this stuff does not require admin privileges. And in any case, there is no admin for this project because security is not enabled.

What you might try, after ensuring you've got backups and stuff et cetera, is enable security, use the admin account to clear all locks, and then disable security again.

There is also another obscure type of lock, although it shouldn't show up with exclamation marks.

You can test for it with a project browser script (go into the Scripting window, create a 'Project Browser' script group, and create a VBScript in that group) like this:
Code: (VBScript) [Select]
option explicit

!INC Local Scripts.EAConstants-VBScript

sub OnProjectBrowserScript()
dim treeSelectedType
treeSelectedType = Repository.GetTreeSelectedItemType()
Repository.EnsureOutputVisible("Script")

select case treeSelectedType
case otPackage
dim package as EA.Package
set package = Repository.GetTreeSelectedObject()
Session.Output "Package '" & package.Element.Name & "' locked: " & package.Element.Locked
case otElement
dim element as EA.Element
set element = Repository.GetTreeSelectedObject()
Session.Output "Element '" & element.Name & "' locked: " & element.Locked
case else
Session.Prompt "This script does not support items of this type.", promptOK
end select
end sub

OnProjectBrowserScript

Just replace everything EA puts in the script for you with the above, then right-click one of the offending elements / packages and select Script - (whatever you called your script). If it says False, it's not locked in that way either.


/Uffe
My theories are always correct, just apply them to the right reality.

karindeboer

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: How to unlock element table without lock-option in element context menu
« Reply #13 on: March 29, 2018, 07:15:27 pm »
Hello Uffe,

I tried to Enable Security, but EA asks for an authorization key, which I don't have. I also couldn't insert one: the OK-button stays inactive. I think our ICT-supplier does have that key, because yesterday they used one when we were trying to solve another issue with EA.

Next I ran the script on the three locked table and one table that isn't locked. It returned Waar (True) on the three locked tables and Onwaar (False) on the unlocked table. So it must be the kind of unusual lock you were mentioning in your post.

Do you know how to unlock that kind of lock?

Gr. Karin

Nizam

  • Prolab Moderator
  • EA User
  • *
  • Posts: 320
  • Karma: +15/-2
  • Model Sharing - Simplified
    • View Profile
    • Professional Model Collaboration
Re: How to unlock element table without lock-option in element context menu
« Reply #14 on: March 30, 2018, 02:42:23 am »
Something strange is happening with locks, If I were you, I'll try to get the Security Key to Enable Security, and clear all the locks (logging in as administrator) and disable security again.