When executing event frame queries from the query compendium againstNugreen Database, the event frames need to exist in order for the sample queries to return results. Running the analysis service to continuously generate these event frames, however, is an expensive operation for a database that is typically infrequently used.
If the following queries are executed, for example, there will be no rows returned:
To combat this, PI SQL Commander allows for the easy creation of the last day's worth of sample event frames for NuGreen when PI OLEDB Enterprise is installed.
- Connect to the AF Server that houses the NuGreen database under the PI OLEDB Enterprise OLEDB Data Sources in the Object Explorer
- Right Click on the NuGreen database and select "Generate Sample Event Frames
- Click Execute, and allow for the generation of the necessary templates and event frames
The above queries can now be re-executed to show results since this NuGreen database will have event frames for the previous day:
Note: PI OLEDB Enterprise is read-only, but since it is an AF SDK client, it is known that the AF SDK is installed locally on this machine. This script is executing AF SDK commands directly to generate the necessary templates and event frames. This feature is not currently available for PI SQL Client (RTQP) because it is not necessary to have the AF SDK installed on the client machine, and therefore it's not known that this operation will succeed. The RTQP Engine is also read-only, so the event frame generation commands, like the PI OLEDB Enterprise query engine, cannot parse them into write commands. It is a future enhancement to bring this same functionality to PI SQL Client (RTQP) in a future release, but for now, the PI OLEDB Enterprise connection will need to be used for the event frame generation through PI SQL Commander.