@GetDBActivity
Syntax
@GetDBActivity(DBHANDLE1;RETTDLIST2;RETNUMBERLIST3;RETNUMBERLIST4;RETTEXTLIST5);
@GetDBActivity(DBHANDLE1;RETTDLIST2;RETNUMBERLIST3;RETNUMBERLIST4;RETTEXTLIST5;RETTDLIST6);
@GetDBActivity(DBHANDLE1;RETTDLIST2;RETNUMBERLIST3;RETNUMBERLIST4;RETTEXTLIST5;RETTDLIST6;RETFLOATLIST7);
Description
Retrieves the user-activity log of the database with DBHANDLE1.
The @Function result is 1 if there is no error, or @ERROR.
The last four arguments of the @Function are return parameters:
In RETTDLIST2 the times are returned.
In RETNUMBERLIST3 the number of reads is returned.
In RETNUMBERLIST4 the number of writes is returned.
In RETTEXTLIST5 the names are returned.
RETTDLIST6:
Element 1 contains the time at which recording began.
Element 2 contains the time at which recording ended.
RETTDLIST2:
Element Meaning
1 Total uses
2 Total reads
3 Total writes
4 Total uses on the previous day
5 Total reads on the previous day
6 Total writes on the previous day
7 Total uses in the previous week
8 Total reads in the previous week
9 Total writes in the previous week
10 Total uses in the previous month
11 Total reads in the previous month
12 Total writes in the previous month
Example: @GetDBActivity(DBHANDLE1;RETTDLIST2;RETNUMBERLIST3;RETNUMBERLIST4;RETTEXTLIST5)
DBHANDLE1:=@OpenDB("TEST.NSF");
@GetDBActivity(DBHANDLE1;RETTDLIST2;RETNUMBERLIST3;RETNUMBERLIST4;RETTEXTLIST5);
List:=@Text(RETTDLIST2)+" "+RETTEXTLIST5+" READS:"+@Text(RETNUMBERLIST3)+" WRITES:"+@Text(RETNUMBERLIST4);
@LogReport(@Implode(List;@NewLine);3);
DBHANDLE1:=@CloseDB(DBHANDLE1);
The database is opened, the user-activity log is retrieved and output. The database is then closed again.
Note : This text was machine-translated and may contain inaccuracies.
