This topic describes how to save, manage, and use the custom SQL commands.
You have access permissions to DMS and you have logged on to the DMS console.
This example uses MySQL databases.
Select a MySQL database and click Log on to Database.
In the top navigation bar, choose SQL Operations>SQL Window to open a SQL window.
Click My SQL Scripts. The buttons that are used to manage frequently used SQL commands are displayed, as shown in the following figure.
Callout number 1: Click My SQL Scripts, and the My SQL Scripts secondary menu appears.
Callout number 2: Click Add SQL to add a frequently used SQL command.
Callout number 3: ClickSelect SQL to view the frequently used SQL commands that you have saved.
Callout number 4: Click Manage SQL to manage frequently used SQL commands. You can add, modify, and delete SQL commands.
Callout number 5: Frequently used SQL commands. Click the selected SQL command to add the command to the SQL Window.
Choose My SQL Scripts>Add SQL to open the Add SQL window.
Enter the title, applicable scope, and SQL statement to be saved.
The applicable scope specifies the databases or instances that the customized common SQL command can be applied to.
All databases: You can view the custom SQL command in any database that you log on to through DMS.
Current instance: You can view the custom SQL command only through the currently connected instance (IP address:port number).
Current database: You can view the custom SQL command only through the currently connected database. If you log on to another database, you cannot view the custom SQL command by choosing My SQL Scripts>Select SQL.
- Click Add, and DMS will save the common SQL command that you have entered.
Choose My SQL Scripts>Manage SQL to open the Manage SQL window, as shown in the following figure.
Callout number 1: You can click Edit or Delete to edit or delete a SQL command in My SQL Scripts.
Callout number 2: You can click Add to add a SQL command.
Double-click a SQL command in My SQL Scripts to add the command to the SQL window. The command is selected in the SQL window.