Icon View Thread

The following is the text of the current message along with any replies.
Messages 11 to 17 of 17 total
Thread Backup creates files it can't restore?
Fri, Oct 26 2018 2:34 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Blake


Raul's is a good recommendation (just a nightmare to wade through). Another thought just occured - any open queries?

Roy Lambert
Fri, Oct 26 2018 4:20 PMPermanent Link

Raul

Globestar Systems

Team Elevate Team Elevate

On 10/26/2018 2:34 AM, Roy Lambert wrote:
> Raul's is a good recommendation (just a nightmare to wade through). Another thought just occured - any open queries?

Looping thru active datasets would show those as well - queries and
tables are both datasets.

I've used this before and it's not a nightmare even in general case as
most of the info is easily identifiable.

In this case there should not be much going on anyways since it's backup
time.

Raul

Fri, Oct 26 2018 11:47 PMPermanent Link

Blake

Thanks, guys. I'm gonna give this a try and see how it works out.
Sat, Oct 27 2018 2:47 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Raul


>I've used this before and it's not a nightmare even in general case as
>most of the info is easily identifiable.

The degree of nightmareishness depends on how good a guess you can ,ake as to when whatever was opened and should have been closed, and its multipled by a factor of about 10 when you have threads involved.

Mind you I also hate going through wireshark's output as well.

Roy
Sat, Oct 27 2018 12:57 PMPermanent Link

Raul

Globestar Systems

Team Elevate Team Elevate

On 10/27/2018 2:47 AM, Roy Lambert wrote:
> The degree of nightmareishness depends on how good a guess you can ,ake as to when whatever was opened and should have been closed, and its multipled by a factor of about 10 when you have threads involved.

Really depends on your design - we have a heavily multi-threaded server
but it's still 1 session per thread and then usually 1 database as well
so only large numbers would be datasets (table/query instances)

> Mind you I also hate going through wireshark's output as well.

For example sample output from one of our apps running looks like this.


 DBISAMSession_1
   DBISAMDatabase_DBISAMSession_1
     ClientGuiTable.  Table = CLIENT
     RegGuiTable.  Table = REG
     TLSCertTable.  Table = TLSCERT

 DBISAMSession_2
   DBISAMDatabase_DBISAMSession_2
     LookupQuery.  Query SQL = SELECT * FROM location L

.....
and so on for 22 threads worth - however logically it's easy to track
things down in our case

Raul
Sat, Oct 27 2018 1:01 PMPermanent Link

Raul

Globestar Systems

Team Elevate Team Elevate

On 10/26/2018 11:47 PM, Blake wrote:
> Thanks, guys. I'm gonna give this a try and see how it works out.
>

here's a quick copy/paste version of some of out utility functions

you can call it for exmaple using

showmessage(DumpDBISAMActiveDatasets);



function DumpDBISAMActiveDatasets: string;
var
  i:integer;
begin
  result := '';
  if (Engine.Active) and (Engine.EngineType=etClient) then
    for I := 0 to Engine.SessionCount - 1 do result := result +
DumpSession( Engine.Sessions[i],1);
end;

function DumpSession(dbsession:TDBISAMSession;LogLevel:integer):string;
var
  i:integer;
begin
  result := aSPC[LogLevel] + dbsession.SessionName + CRLF;
  for I := 0 to dbsession.DatabaseCount - 1 do result := result +
aSPC[LogLevel] + DumpDataBase(dbsession.Databases[i],LogLevel+1) + CRLF;
end;

function DumpDataBase(database:TDBISAMDatabase;LogLevel:integer):string;
var
  i:integer;
begin
  result := aSPC[LogLevel] + database.DatabaseName + CRLF;
  for I := 0 to database.DataSetCount - 1 do result := result +
aSPC[LogLevel] + DumpDataSet(database.DataSets[i],LogLevel+1) + CRLF;
end;

function DumpDataSet(dataset:TDBISAMDataSet;LogLevel:integer):string;
var
  i:integer;
begin
  result := aSPC[LogLevel] + dataset.Name + '. ';
  if (dataset is TDBISAMTable) then
    result :=  result  + ' Table = ' + TDBISAMTable(dataset).TableName
  else if (dataset  is TDBISAMQuery) then
    result :=  result  + ' Query SQL = ' + TDBISAMQuery(dataset).SQL.Text
  else
    result := result + ' ClassName = ' + dataset.ClassName;
end;

Add "dbisamtb" to your uses


Raul
Sun, Oct 28 2018 6:01 PMPermanent Link

Blake

>>here's a quick copy/paste version of some of out utility functions

Cool, thanks. Have it stashed.

I decided to try:

       Databases[I].CloseDataSets

And everything is fine now. I'm going to use that more often.
Previous PagePage 2 of 2
Jump to Page:  1 2
Image