Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread Exclusive use of Tables so I can optimize
Tue, Feb 10 2015 9:18 PMPermanent Link

Jeff Cook

Aspect Systems Ltd

Avatar

Hi

I was typing up a long description of a problem when I solved it for myself.

I needed to close all the tables and queries that might be open so that
I could perform an optimise of all tables.

I used CloseDatasets thinking that this would fix everything but it
didn't because it left TEDBScript's open and the table referred to in
the script

This is despite the manual that says:-

The TEDBScript component descends from the TEDBDBDataSet component,
which descends from the TEDBDataSet component, which descends from the
common _TDataSet_ component ...

Bit of an obscure problem and I imagine there is a good reason for not
closing scripts along with tables and queries, but I can't think of one.
Is it perhaps a bug or oversight?

EDB 2.17 Build 1

Hope this helps someone else who hits the same problem.

Cheers

Jeff
Wed, Feb 11 2015 2:33 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Jeff


I'd suggest closing the session. However, the big problem (for multiuser) is not closing the tables but sopping some nice person reopening them before you get to the point of optimising or repairing a table.

Roy Lambert
Wed, Feb 11 2015 10:36 AMPermanent Link

Barry

>I'd suggest closing the session. However, the big problem (for multiuser) is not closing the tables but sopping some nice person reopening them before you get to the point of optimising or repairing a table.<

You could shut the (public) server down and have another (private) server do the maintenance. When the maintenance is finished, restart the public server.

Barry
Wed, Feb 11 2015 10:56 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Barry


Hmmm. That's quite a nice idea if its physically doable.

Roy Lambert
Wed, Feb 11 2015 3:35 PMPermanent Link

Jeff Cook

Aspect Systems Ltd

Avatar

On 11/02/2015 8:33 p.m., Roy Lambert wrote:
> Jeff
>
>
> I'd suggest closing the session. However, the big problem (for multiuser) is not closing the tables but sopping some nice person reopening them before you get to the point of optimising or repairing a table.
>
> Roy Lambert
>
Hi Roy

As I said - the main problem that I had was closing the datasets opened
by "me" - and missing the fact that scripts result sets were not being
treated as datasets in the TEDBDatabase.CloseDataSets Method.

I already have the code to check for other users logged in:-
----------------------
SELECT DISTINCT
  User, LEFT(Process FOR POSITION(':' IN Process) - 1) AS Computer,
  SessionName AS Session, SessionID, Process, Created, LastConnected
FROM Configuration.ServerSessions
LEFT OUTER JOIN Configuration.ServerSessionLocks ON (SessionID = ID)
WHERE DatabaseName = :DataBase
  AND SessionID <> :CurrentRemoteID
--  AND Connected = True
ORDER BY User, Process
-------------------------

.... and I can toss them off if necessary with REMOVE SERVER SESSION
(access is c/s only so I don't have to worry about direct connects).

All I need now is a maintenance flag that prevents users from logging on
again and a messaging system that tells users to log of before they get
tossed off.

Cheers and Thanks to all

Jeff

Image