This article describes how to manage executed queries, search its content and re-use them, using the Executed queries feature.
To enable the Executed queries feature, check the Log executed queries option:
Searching the executed queries
The content of the executed queries can be searched through the search box at the top of the window. Specifying the search hint and searching through the executed queries will show a list of all queries that contain specified term, and in the query content preview, searched term will be highlighted:
Re-using executed queries
Content of each query from the Executed queries window can be copied and re-used. With a double-click on the query from the list, it will automatically put the query content in a new query window:
Q: Can I browse the executed queries even if the Executed queries feature is disabled?
A: Yes. All executed queries are accessible from the Executed queries window, no matter if the feature is enabled or disabled.
Q: Will the executed queries information will be deleted when the Executed queries feature is disabled?
A: No. Already logged executed queries will not be deleted, but all queries executed after disabling the feature won’t be logged.
Q: Will the installation or upgrade of ApexSQL Complete delete the information about executed queries?
A: No. The uninstallation or upgrade to a newer version does not affect saved information about executed queries, unless they are manually removed or edited.
Q: Where the information about executed queries is stored?
A: By default, the information about executed queries is stored in the following location:
Q: What is the way the information about executed queries is stored?
A: The information about executed queries is stored in a way that a separate folder is created based on date (i.e. 07-11-2015). Each folder contains an xml file where the information about all executed queries for the specified date is stored.
Q: Can I edit the information about the executed queries outside the host application (SQL Server Management Studio or Visual Studio)?
A: Yes. XML files that keep store the information about executed queries can be edited. However, this is not recommended, since there is a possibility to break the structure of the XML file and it won’t be loaded in the Executed queries window, or it won’t show the information properly.
Q: What is the minimum date that can be set in the “From” date filter?
A: This can be set in the Executed queries tab, under the Options window by changing the Default period option:
A: Each execution will be saved as a separate event, since ApexSQL Complete logs executed queries by the time of the execution regardless of a query content.
Q: Can I use the information about executed queries on another machine?
A: Yes, just copy the Executed queries folder and paste it to the corresponding folder on another machine. After the host application is started, all information will be accessible through the Executed queries window.