Skip to content

SQL Scripts – Clear Users and Activity Locks

June 19, 2010

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.

Use DYNAMICS
Delete SY00800
Delete SY00801
Delete ACTIVITY

Use TEMPDB
Delete DEX_LOCK
Delete DEX_SESSION

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

Thanks David!

About these ads

From → Dynamics GP

3 Comments
  1. Hi Ron

    Check out this version which works while users are still logged in.

    http://blogs.msdn.com/b/developingfordynamicsgp/archive/2008/12/03/releasing-stuck-batches-and-transactions-without-exiting-all-users.aspx

    David

  2. Ron permalink

    Thanks David! This has alway been aggravating to me to make sure all users are out of the system.

    Ron

Trackbacks & Pingbacks

  1. SQL Scripts – Clear Users and Activity Locks - DynamicAccounting.net

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 28 other followers

%d bloggers like this: