- What's New
- Service Overview
- Getting Started
-
User Guide
- Database Evaluation
- Object Migration
- SQL Statement Conversion
- Conversion Configuration
- SQL Audit
- Data Source Management
- Permissions Management
- Interconnection with CTS
- Best Practices
- Security White Paper
-
API Reference
- Before You Start
- API Types
- Calling APIs
-
API
- API Version Management
- Quota Management
- SQL Statement Conversion
- Evaluation Project
-
Migration Project
- Creating a Migration Project
- Querying Migration Projects
- Querying the Status of a Migration Project
- Checking Target Database Permissions
- Querying Permission Check Results
- Querying Migration Project Details
- Submitting Syntax Conversion of Objects
- Querying Syntax Conversion Progress of Objects
- Submitting Verification
- Querying the Verification Progress
- Downloading a Migration Error Report
- Deleting a Migration Project
- Permissions Policies and Supported Actions
- Appendixes
- SDK Reference
-
FAQs
-
Product Consulting
- Instance Freezing, Release, and Deletion
- Which Schemas in Source Databases Are Ignored for Migration?
- What Are the Differences Between Syntax Conversion and Migration & Verification in a Migration Project?
- What Are the Database Schema Changes After an Oracle Database Is Migrated to the Target Database?
- Why Cannot I Use Some Functions?
- What Is the Function of the dsc_ora_ext Schema Generated After Migration to the Target Database?
- What Should I Do If Data Collection Fails or Is Slow Due to the Small Values of Certain Oracle SGA Parameters?
- What Should I Do If Data Collection Fails and a Message SNAPSHOT TOO OLD Is Displayed?
- What Is the Mapping Between the GaussDB Versions Displayed on the UGO Console and Self-built GaussDB Versions?
- What Are VPCEP Resource Quotas?
-
Database Connections
- What Should I Do If I Cannot Connect to the Source Oracle Database During Database Evaluation Project Creation?
- What Should I Do If I Failed To Connect to the Source Database as User sys?
- How Do I Create GaussDB Databases Compatible with Source Databases?
- What Should I Do If My Database Fails to be Connected?
- SQL Server Connection Test Failed (Error Code=0, SQLState=08S01)
-
Evaluation Project
- How Do I Select a Connection Method?
- How Does UGO Collect Data from Source Databases?
- How Does UGO Check Database Permissions?
- What Are the Possible Causes for an Object Collection Failure?
- In GaussDB, How Do I Configure a Search Path If A Statement Without Schema Name Fails To Be Executed?
- What Is Native Compatibility, Conversion Compatibility, Partial Compatibility, or Incompatibility?
- What Is the Relationship Between Migration Risk (Top 10 risk SQL) and Risky SQL Summary?
- What Are Reconstruction Statistics and How Are Reconstruction Points Measured?
- What Should I Do If An Object Collection Error (Closed Connection) Is Displayed During Evaluation Project Creation?
- What Should I Do If "ErrorCode=4036" Is Displayed During Evaluation Project Creation?
- What Should I Do If "ErrorCode=17002" Is Displayed During Evaluation Project Creation?
- What Do I Do If the Assessment Task Is Connected but the Pre-check Fails?
- What Is the Impact of the Collection on the Source Database?
-
Migration Project
- Why Is There No Available Evaluation Project During Migration Project Creation?
- When Should I Use the Conversion Config Function?
- What Should I Do If SQL Modifications Failed to Be Saved During Object Correction?
- How Do I Solve ERROR: syntax error at or near "@"?
- What Are the Possible Causes for an Object Verification Failure?
- What Are the Impacts of GUC Parameter Settings of GaussDB on Migration?
- How Do I Set GaussDB GUC Parameters?
- Why Is the Number of Indexes Different After Oracle Data is Migrated to GaussDB?
- What Should I Do If There Are ctid, xc_node_id, and tableoid Columns in GaussDB?
- Why Is Data Inconsistent When SELECT Statements Without ORDER BY Are Used for Query in Distributed GaussDB?
-
Product Consulting
- Videos
- General Reference
Show all
Copied.
Creating a File Audit Task
Scenarios
You want to check whether SQL statements in a file comply with specifications and affect performance.
Constraints
- Only four types of syntax for nested statements can be audited. For details, see Table 1.
- The table name and table alias must be different. The aliases of different tables must be different.
- Tables in a view cannot be audited.
- Database system tables and system views cannot be audited.
- MySQL statements containing number signs (#) cannot be audited.
- You cannot click Retry when the file is being or has been audited.
- If a system template is used, the audit results before and after a version upgrade will be inconsistent. You are advised to use a custom template.
- Up to 110 SQL audit tasks can be created, and up to 10 can be executed concurrently.
Procedure
- Log in to the UGO console.
- In the navigation pane, choose SQL Audit > Statement Audit. Click the SQL from Files tab.
- Click Upload File.
Figure 1 Upload a file
Table 1 Parameter description Parameter
Example Value
Description
Database Type
GaussDB
Select a database type. Currently, only GaussDB, MySQL, and PostgreSQL are supported.
Data Source
app_db_01
Select a data source. Currently, only GaussDB, MySQL, and PostgreSQL are supported.
This parameter is optional. If no data source is provided, the audit rules that depend on the data source are skipped by default.
Schema
demo_schema_01
Select a schema. This parameter is optional and only available for GaussDB and PostgreSQL databases.
- If the SQL statement contains a schema name, use the schema in the SQL statement.
- If the SQL statement does not contain a schema name, the selected schema is used.
- If the SQL statement does not contain a schema name and no schema is selected, use the public schema.
Rule Template
baseline_template_01
Select a template based on the selected database type.
You can set the template information by referring to Adding a Rule Template.
Upload Data File
sql_code.zip
Upload a SQL file that meets the following requirements:
- The SQL object name can contain only lowercase letters. If you enter an uppercase SQL object name, the system automatically converts it to lowercase letters.
- The file can contain only simple SQL statements, such as INSERT, ALTER, DELETE, SELECT operations, and cannot contain stored procedures, functions, triggers, packages, or anonymous blocks, which is regarded as one SQL statement for audit.
- Only .zip, .xml, .sql, .java, and .json files can be uploaded.
- The file name can contain only digits, letters, underscores (_), and hyphens (-).
- Maximum file name length: 240 characters
- Max. file size: 5 MB.
- Only XML, SQL, Java, and JSON files in the .zip package can be audited. Any other file types will be skipped automatically.
- Max.size per file: 10 MB
- Max. files: 10,000
- The file name can contain only digits, letters, underscores (_), and hyphens (-).
- Maximum file name length: 240 characters
- Files to be uploaded cannot contain sensitive data such as binary files, passwords, and keys.
NOTE:
Only JSON files generated during workload replay on DRS can be parsed.
Recommend Index
Enable
Disabled by default. Currently, only GaussDB is supported.
Description
Audit SQL statement for a service query
(Optional) Enter a description, which contains up to 100 characters.
- Click OK to view the created task in the list.
Figure 2 Audit task list
The status can be one of the following:
- Pending: The SQL audit task is to be scheduled.
- Collecting objects: SQL statements scanned in the file.
- Auditing SQL statements: The file is being audited.
- Audit completed: The audit is complete only after all SQL statements in the file are audited.
- Audit failed: An exception occurred during the audit.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot