by Klaus Graefensteiner
29. August 2008 02:52
Introduction
Occasionally I come across some objects in the ArchestrA IDE that look like they are checked out, but using the standard commands "Check In", "Undo Check Out" and "Override Check Out" don't succeed for various reasons. For example an object could be checked out by another user, or the object is left checked out after some unexpected problem with the Galaxy Repository. On the other hand some operations performed on a collection of objects require exclusive access to these objects in order for the operation to succeed. Examples of these operations are "Export Objects", " Duplicate IDs" with the Duplicate ID Utility and "Galaxy Backup". This blog post gives some assistance to troubleshoot this situation and to alleviate the problem.
Figure 1: Galaxies "checking out" "objects" from each other
Verify that all objects are checked in
To verify that all objects are checked use the Galaxy -> Galaxy Status command in the IDE. This will display the following dialog. Make sure that the number of checked-out objects is 0.
Figure 2: Galaxy Status Dialog
Check-in or Undo Checkout of the objects you checked-out yourself
Select the objects that are currently checked-out by yourself and chose either the Check In or Undo Check Out from the Right-Mouse-Click-Menu.
Figure 3: Check in and out options
Check-in or Undo Checkout of the objects from others
Ask other users to login under their account and check in their objects as well. If your account has Administrative rights, then you have the option to perform an Override Check Out to gain ownership of objects that are checked out by other users and check the object in or undo the checkout.
Run the following query to find out what objects are checked out by what users:
1: -- Find what objects are checked out by what users
2: select o.tag_name, o.hierarchical_name, u.user_profile_name, o.checked_out_package_id
3: from gobject o
4: inner join user_profile u
5: on
6: o.checked_out_by_user_guid = u.user_guid
7: where checked_out_package_id <> 0 and checked_out_by_user_guid is not null
Last resort for removing checked out flags
If all of the above procedures don't work, then use the following temporary workaround to remove the checked-out flags. Here are the steps:
- Close all IDEs, the Duplicate ID Utility and any other GRAccess application that are connected to the Galaxy Repository.
- Launch the SQL Server Management Studio and connect to the Galaxy Database.
- To forcefully undo a check out run the following script. This should only be considered as the last resort, if everything else doesn't work and you are stuck.
1: -- Force an undo checkout
2: update gobject
3: set checked_out_by_user_guid = null, checked_out_package_id = 0
4: where checked_out_package_id <> 0 and checked_out_by_user_guid is not null
Ausblick
This procedure is only the last resort and should only be considered after putting some precautionary measures in place. The most important one being creating a backup of galaxy database. Good luck!