Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 8 of 8 total
Thread Resetting a record lock
Tue, Oct 20 2009 6:23 AMPermanent Link

"Al Vas"
Hi,

DBISAM V3.30

Is there a way to reset a record lock in client-server mode.  We have the
situation where clients are sometimes ctrl-alt-del out or TS sessions
dropping out when a record lock is present.  These dont seem to clear in a
timely fashion (in fact at all) so we have to get all users out so that we
can reset the database engine to clear the lock.

Thanks

Alex

Tue, Oct 20 2009 10:47 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Alex,

<< Is there a way to reset a record lock in client-server mode.  We have the
situation where clients are sometimes ctrl-alt-del out or TS sessions
dropping out when a record lock is present.  These dont seem to clear in a
timely fashion (in fact at all) so we have to get all users out so that we
can reset the database engine to clear the lock. >>

When the session is removed, the locks should be released.  To have this
occur in a timely fashion with 3.30, you need to set the Dead Session
Expiration Time to a much lower value.  By default, it is set to 12 hours,
or 43200 seconds.

--
Tim Young
Elevate Software
www.elevatesoft.com

Wed, Oct 21 2009 2:21 AMPermanent Link

"Al Vas"
Thanks Tim, the downside of this - me no stupid Smile?

Alex
"Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote in message
news:14702B8D-34CE-4C9E-B402-2E78DCB335C7@news.elevatesoft.com...
> Alex,
>
> << Is there a way to reset a record lock in client-server mode.  We have
> the situation where clients are sometimes ctrl-alt-del out or TS sessions
> dropping out when a record lock is present.  These dont seem to clear in a
> timely fashion (in fact at all) so we have to get all users out so that we
> can reset the database engine to clear the lock. >>
>
> When the session is removed, the locks should be released.  To have this
> occur in a timely fashion with 3.30, you need to set the Dead Session
> Expiration Time to a much lower value.  By default, it is set to 12 hours,
> or 43200 seconds.
>
> --
> Tim Young
> Elevate Software
> www.elevatesoft.com
>

Wed, Oct 21 2009 5:10 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Alex,

<< Thanks Tim, the downside of this - me no stupid Smile? >>

I don't quite get that sentence....or question... Smiley

--
Tim Young
Elevate Software
www.elevatesoft.com

Thu, Oct 22 2009 2:49 AMPermanent Link

"Al Vas"
Tim,

Checked on a particular client and the dead session expiry was already set
to 90seconds.  Any idea then why records would remain locked indefinitely
until the database engine is shut down?  Definitely no way of forcing a
record to unlock in code?

Alex

"Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote in message
news:D628EEFD-E718-45F1-94EC-6AF9C34991E3@news.elevatesoft.com...
> Alex,
>
> << Thanks Tim, the downside of this - me no stupid Smile? >>
>
> I don't quite get that sentence....or question... Smiley
>
> --
> Tim Young
> Elevate Software
> www.elevatesoft.com
>

Thu, Oct 22 2009 11:49 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Alex,

<< Checked on a particular client and the dead session expiry was already
set to 90seconds.  Any idea then why records would remain locked
indefinitely until the database engine is shut down? >>

The only other way would be if there was an error removing the session and
it was still present on the server.  Did you check the server log to see if
this was the case ?

<< Definitely no way of forcing a record to unlock in code? >>

No, the only way is to remove the session that owns the record lock.

--
Tim Young
Elevate Software
www.elevatesoft.com

Mon, Oct 26 2009 7:43 AMPermanent Link

"Al Vas"
Hi Tim,

This is a common problem at times with a number of clients.  Often see
disconnected sessions.  Is there a command to clear disconnected sessions?

Thanks
Alex
>
> The only other way would be if there was an error removing the session and
> it was still present on the server.  Did you check the server log to see
> if this was the case ?
>
Tue, Oct 27 2009 6:57 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Alex,

<< This is a common problem at times with a number of clients.  Often see
disconnected sessions.  Is there a command to clear disconnected sessions?
>>

Yes, you can log in to the admin port (12006) as an administrator and remove
sessions that way:

     function GetRemoteSessionCount: Integer;
     function GetRemoteConnectedSessionCount: Integer;
     function GetRemoteSessionInfo(SessionNum: Integer;
                                   var SessionID: Integer;
                                   var CreatedOn: TDateTime;
                                   var LastConnectedOn: TDateTime;
                                   var UserName: string;
                                   var UserAddress: string;
                                   var TypeOfSession: TRemoteType;
                                   var LastUserAddress: string): Boolean;
     function DisconnectRemoteSession(SessionID: Integer): Boolean;
     function RemoveRemoteSession(SessionID: Integer): Boolean;

You can see how this is done in the source code for the Server
Administration Utility that comes with the DBISAM 3.x Additional Software
and Utilities download (<InstallDir>\utils\srvadmin\source).

--
Tim Young
Elevate Software
www.elevatesoft.com

Image