SQL Scripts – Clear Users and Activity Locks
Often times, when needing to perform maintenance in GP, your users will be logged out but GP still thinks they have documents open, batches they are working in, etc. This script will clear out off the user activity locks as well as their logins.
***This will remove ALL users from being logged in. Please make sure that users are indeed logged out before running this script.
Updated (6/23/2010) – David Musgrave has pointed out a better way to do this. You can actually run this version while users are logged in and not affect their login status. Check it out: http://blogs.msdn.com/b/developingfordynamicsgp/archive/2008/12/03/releasing-stuck-batches-and-transactions-without-exiting-all-users.aspx