The OLAPOPERATE Procedure

Listing Session Queries on an OLAP Server

You can list information about session queries with the LIST QUERIES statement.
LIST QUERIES [SESSION=owner] [OUT=data-set];
If the SESSION option is specified, then the queries associated with a particular user are listed. Otherwise, all queries are listed. If the OUT option is specified, the output is written to the specified data set.
The LIST QUERIES statement generates the following information:
MDX String
contains the MDX string for the query. The cube referenced in the query is easily determined because the FROM clause is placed at the front of the query. For example, an MDX query such as select measures.members on columns from mddbcars is displayed as from mddbcars select measures.members on columns.
Results Set Type
indicates the type of the query's results set. Valid values for this item are Multidimensional or Flattened Rowset.
Size
indicates the approximate memory used in the query.
Note: For SAS versions earlier than 9.2, this item indicates the number of cells returned in the query.
For clients connecting to a SAS 9.2 or later version of the OLAP server, the following information is also available:
Last Update Time
indicates the last time the result set was accessed. For example, a result set is considered to be accessed when a method call such as ReadCells is made against it.
Query ID
is the query ID.
Read Cells
indicates the number of cells read.
Total Cells
indicates the total number of cells.
Note: For SAS versions earlier than 9.2, this item is equivalent to Size.
Here is an output example for LIST QUERIES when connected to an OLAP server prior to SAS 9.2:
Query Statement "FROM MDDBCARS SELECT"
Query ID: A170866D-2922-48B1-8CD8-A3BF2C97705D
Query type is Multidimensional
Query size in cells =  1
Here is an output example for LIST QUERIES when connected to a SAS 9.2 or later OLAP server:
Query Statement "FROM MDDBCARS SELECT"
Query ID: A170866D-2922-48B1-8CD8-A3BF2C97705D
Query type is Multidimensional
Query size in bytes =  685772
Total cells = 1 and cells read = 1
The time of last data set access is 12Apr2011:11:21:21

Query Statement "FROM SALES SELECT"
Query ID: 67F072EF-22B6-4EC9-B79A-013B72A5BE53
Query type is Flattened
Query size in bytes =  684244
Total cells = 1 and cells read = 1
The time of last data set access is 12Apr2011:13:55:04