Recording Queries
Director lets you record the background SQL for common GUI operations such as Create a Procedure, Modify a User, and so on—tasks that are performed using SQL or Name Server interaction—so that it can be played back later. For example, here are some common tasks that could be recorded and then reused, perhaps on a different installation:
• Create a Server Connection Definition in multiple client installations.
• Add a new user to a number of installations.
• Create or modify a table from a test database to a production database.
While recording is activated, all SQL or Name Server queries that the GUI generates are recorded to the file you specify. After the desired actions are recorded, you stop the recording. You can then open the file, edit it, and then execute it as a query (or by using “Run Script…” from the Server Connection Definitions folder in the Instance Explorer, for Name Server operations). You can also make what is recorded compatible with the Terminal Monitor and netutil command line tools.
The most useful mode of operation is to turn on query recording, open a dialog (such as New User or New Procedure), complete the dialog and execute the operation by clicking OK. Then turn off query recording and open the file as a query document. This document should contain only the SQL that was generated by the dialog. The SQL can be replayed elsewhere without having to fill out the dialog again with the same information.
Observe the following caveats when recording:
• If you click and expand items in the Instance Explorer, you may record a mix of Name Server and SQL data in the file. Although this information can be instructive, you will need to edit the file before you can run it as a query (especially when using the command line tools).
• Because the results of the queries used to populate the Instance Explorer are cached, simply opening a branch item might not produce any SQL, so it would not necessarily show up in the recording.
To edit saved queries, see
Open an Existing Query.
Last modified date: 04/24/2023