Troubleshooting WAS Phantom Checkouts

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.

TwoGalaxies

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.

Galaxy Status Dialog

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.

Check in and out options

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!

Tags: ,

WAS | Wonderware

Comments are closed

About Klaus Graefensteiner

I like the programming of machines.

Add to Google Reader or Homepage

LinkedIn FacebookTwitter View Klaus Graefensteiner's profile on Technorati
Klaus Graefensteiner

Klaus Graefensteiner
works as Developer In Test and is founder of the PowerShell Unit Testing Framework PSUnit. More...

Open Source Projects

PSUnit is a Unit Testing framwork for PowerShell. It is designed for simplicity and hosted by Codeplex.
BlogShell is The tool for lazy developers who like to automate the composition of blog content during the writing of a blog post. It is hosted by CodePlex.

Administration

About

Powered by:
BlogEngine.Net
Version: 1.6.1.0

License:
Creative Commons License

Copyright:
© Copyright 2012, Klaus Graefensteiner.

Disclaimer:
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

Theme design:
This blog theme was designed and is copyrighted 2012 by Klaus Graefensteiner

Rendertime:
Page rendered at 2/5/2012 10:10:53 PM (PST Pacific Standard Time UTC DST -7)