SQL Console
The SQL Console in Data Management (DMS) lets you execute various SQL statements and provides a visual interface to manage data in your database, making it ideal for tasks like data querying and development.
Prerequisites
You must have query permissions on the target database or table. To apply for permissions, see Apply for asset permissions by submitting a ticket.
SQL Console interface
Table 1. SQL Console interface components
Area | Section | Description |
Left-side resource tree | Visual operation section | Manage your database visually.
|
Top toolbar | Extended features section | The following features are available:
|
SQL editor pane | Command execution section | Enter an SQL statement and click Execute to perform operations on the database. Other features are also available, such as Format, execution plan, and Settings.
Note You can click the |
Bottom log pane | Execution results section | After you execute an SQL statement, you can view the results. You can also view row details, add rows, delete rows, and submit changes. Note Click Execution History to view the SQL execution history, which includes details such as the start time, database, and SQL, and can be exported. |
Default behavior and limits
If a table contains sensitive or confidential columns and you do not have the required permissions, the query results show
******for these columns. For more information, see Sensitive data management.Note the following about the number of rows returned by a database query:
For a database in Flexible Management mode or Stable Change mode, the default maximum number of rows returned is 3,000.
For a database in Security Collaboration mode, the default number of rows returned is 200, and the system-defined maximum is 3,000. An administrator can modify the number of rows returned in the Basic Configuration Item section by navigating to .
NoteIf you need to query more data without being restricted by security rules, you can export the data to your local computer for analysis. If a table contains sensitive columns, you can apply for permissions to export their data before you export the data. For more information about how to apply for permissions and export data, see Apply for permissions by using a ticket and Export database data.
The maximum size for a full table scan is 10 GB. An administrator can modify this value by navigating to .
The default timeout for executing a single SQL statement is 60 seconds. An administrator can modify this value by navigating to .
Procedure
Log in to DMS 5.0.
In the top navigation bar, choose .
NoteIf you are using the console in Simple mode, click the
icon in the upper-left corner and choose All functions > SQL Console > SQL Console.In the Select Database dialog box, search for and select a database, and then click Confirm.
In the SQL Console area, enter an SQL statement, and then click Execute.
FAQ
Q: I use Data Management Service (DMS) to log in to a MongoDB instance. When I execute an SQL statement, I receive the error 'Incomplete command. Please check.'
A: Some MongoDB commands require the new parser. Click Open Parser to switch to the new parser. For a complete list of commands supported by the new parser, see Supported MongoDB commands.
Related documents
After you understand the features of the SQL Console interface, you can create tables, query data, or modify data in the SQL Console. For more information, see Get started with the SQL Console.
(Apply for data owner/Change control): Click this icon to apply to be a data owner or to configure DDL, DML, and SELECT change permissions for the target database.
(Table List): Click this icon to switch to the Table List page, and click the
icon to return to the Query page.
(Data Analysis): Click this icon to create a data analysis ticket. For more information, see
(Database Analysis): Provides database autonomy services such as one-click diagnostics, real-time performance, instance sessions, and space analysis through Database Autonomy Service (DAS). You are redirected to the DAS console. For more information, see
(Sync Metadata): After you click this button, DMS collects the latest metadata from the database, such as tables, columns, indexes, and Programmable Objects. This enables hierarchical permission control for tables, columns, and Programmable Objects. For more information, see
(Export): Use the export feature to export a database, its table structure, or table creation statements. You can also access the
(operation audit): The operation audit feature saves all data query and change records. You can query details like the operation, the user, and the time of the operation. For more information, see
(Share): Use this feature to share the console and commands for this database with relevant personnel. For more information, see
(Super SQL Mode): After you enable Super SQL Mode, administrators and DBAs can execute SQL statements in the SQL Console without being restricted by security rules. For more information, see
icon in the upper-right corner of the page to open multiple SQL Console windows.
icon in the upper-left corner and choose All functions > SQL Console > SQL Console.