Subject | Re: [IBO] IBOStatisticalService: How to get all the detailed Index information? |
---|---|
Author | Helen Borrie |
Post date | 2004-11-21T14:14:32Z |
This will get the header stats and then iterate through the indexes,
delivering the stats into a TMemo:
procedure YourForm.btnStatsClick(Sender:TObject);
begin
with IBOStatisticalService1 do
begin
ServerName :='YourServer';
DatabaseName :='YourDBAlias'; // assuming Firebird 1.5
Protocol := TCP_IP;
LoginPrompt :=False;
Params.Add('user_name=sysdba');
Params.Add('password=masterkey');
Active :=True;
ServiceStart;
try
Options :=[HeaderPages,IndexPages,DBLog ];
YourLogMemo.Lines.Clear;
While not Eof do
YourLogMemo.Lines.Add(GetNextLine);
finally
Active :=False;
end;
end;
Helen
delivering the stats into a TMemo:
procedure YourForm.btnStatsClick(Sender:TObject);
begin
with IBOStatisticalService1 do
begin
ServerName :='YourServer';
DatabaseName :='YourDBAlias'; // assuming Firebird 1.5
Protocol := TCP_IP;
LoginPrompt :=False;
Params.Add('user_name=sysdba');
Params.Add('password=masterkey');
Active :=True;
ServiceStart;
try
Options :=[HeaderPages,IndexPages,DBLog ];
YourLogMemo.Lines.Clear;
While not Eof do
YourLogMemo.Lines.Add(GetNextLine);
finally
Active :=False;
end;
end;
Helen