All Products
Search
Document Center

Manage custom SQL commands

Last Updated: Jun 07, 2019

This topic describes how to save, manage, and use the custom SQL commands.

Prerequisites

You have access permissions to DMS and you have logged on to the DMS console.

Background

This example uses MySQL databases.

Procedure

  1. Select a MySQL database and click Log on to Database.

  2. In the top navigation bar, choose SQL Operations>SQL Window to open a SQL window.

  3. Click My SQL Scripts. The buttons that are used to manage frequently used SQL commands are displayed, as shown in the following figure.

    My SQL Scripts

    Notes

    • 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.

  4. Choose My SQL Scripts>Add SQL to open the Add SQL window.

    Add SQL

    1. Enter the title, applicable scope, and SQL statement to be saved.

      Notes

      • 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.

    2. Click Add, and DMS will save the common SQL command that you have entered.
  1. Choose My SQL Scripts>Manage SQL to open the Manage SQL window, as shown in the following figure.

    Manage SQL

    Notes

    • 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.