Esta página ainda não está disponível no idioma selecionado. Estamos trabalhando para adicionar mais opções de idiomas. Agradecemos sua compreensão.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Schema Management

Updated on 2025-01-09 GMT+08:00

This section introduces how to use the database schema. All system schemas are grouped in Catalogs, and user schemas are grouped in Schemas.

Create Schema

  1. In the Object Browser pane, right-click the selected Schemas group and select Create Schema.

    NOTE:

    Only refresh can be performed on Catalogs group.

  2. Enter a schema name and click OK. You can create the schema only if the database connection is active.

    The status bar displays the status of the completed operation.

    You can view the new schema in the Object Browser pane.

NOTE:

Data studio displays default schema of the user in the toolbar.

  • When a CREATE query without mentioning the schema name is executed from SQL Terminal, the corresponding objects are created under the default schema of the user.
  • When a SELECT query is executed in SQL terminal without mentioning the schema name, the objects are queried based on the default schema.
  • When Data Studio starts, the default schemas are set to <username>. The public schemas have the same priority.
  • If another schema is selected in the drop-down, the selected schema will be set as the default schema, overriding previous setting.
  • The selected schema is set as the default schema for all active connections of the database (selected in database list drop-down).

Exporting Schema DDL and Data

You can right-click Export DDL to export the DDL of functions/procedures, tables, sequences, and views of the schema. To export data, choose Export DDL and Data.

  1. In the Object Browser pane, right-click the selected schema and select Export DDL.

    You need to customize the export path. To compress data, select .zip.

    You must select I Agree under the Security Disclaimer, then click OK. You can select Do not show again. After the disclaimer is disabled, it will not be displayed when you export DDL. For details, see Table 1.

  2. Click OK. The operation progress is displayed on the status bar in the lower right corner.

    NOTE:
    • If the file name contains characters that are not supported by Windows, the file name will be different from the schema name.
    • The Microsoft Visual C Runtime file (msvcrt100.dll) is required for this operation. For details, see Troubleshooting.
    • You can select multiple objects and export their DDL. Batch Export lists the objects whose DDL cannot be exported.

    The Data Exported Successfully dialog box and status bar display the status of the completed operation.

    Table 1 The supported DDL encoding formats

    Database Encoding

    File Encoding

    Support for Exporting a DDL

    UTF-8

    UTF-8

    Yes

    GBK

    Yes

    LATIN1

    Yes

    GBK

    GBK

    Yes

    UTF-8

    Yes

    LATIN1

    No

    LATIN1

    LATIN1

    Yes

    GBK

    No

    UTF-8

    Yes

Renaming a Schema

  1. In the Object Browser pane, right-click the selected schema and select Rename Schema.
  2. Enter a schema name and click OK.

    You can view the renamed schema in Object Browser.

    The status bar displays the status of the completed operation.

Granting/Revoking a Privilege

  1. Right-click the schema group and select Grant/Revoke.

    The Grant/Revoke dialog box is displayed.

  2. Open the Object Selection tab to select the desired objects, and click Next.
  3. Select the role from the Role drop-down list in the Privilege Selection tab. Select the permissions to be granted or revoked.
  4. On the SQL Preview tab, you can check the automatically generated SQL query. If the result does not meet the expectation, return to the previous step until the result meets the expectation.
  5. Click Finish.

Dropping a Schema

  1. In the Object Browser pane, right-click the selected schema and select Drop Schema. A confirmation dialog is displayed, prompting you to confirm the deletion.
  2. Click OK. This action will remove the schema from Object Browser.

    A pop-up message and the status bar display the status of the completed operation.

Refreshing a Schema

Right-click a schema name and choose Refresh to refresh all objects in the schema.

Usamos cookies para aprimorar nosso site e sua experiência. Ao continuar a navegar em nosso site, você aceita nossa política de cookies. Saiba mais

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback