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
Situation Awareness
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

Prerequisites

Updated on 2023-03-17 GMT+08:00

Executing Custom DB Scripts

Custom scripts are executed to support input keywords that do not exist in certain versions of the target database. These scripts must be executed in each target database before the migration.

Table 1 describes the custom scripts in the DSC/scripts/ directory. For details about how to execute custom scripts, see Custom DB Script Configuration.

Table 1 Custom DB scripts

Script

Description

date_functions.sql

Custom DB script for Oracle date functions

environment_functions.sql

Custom DB script for Oracle environment functions

string_functions.sql

Custom DB script for Oracle string functions.

pkg_variable_scripts.sql

Custom DB script for Oracle package variable functions

sequence_scripts.sql

Custom DB script for Oracle sequence functions

mig_fn_get_datatype_short_name.sql

Custom DB script for Teradata functions

mig_fn_castasint.sql

Custom DB script for migration of CAST AS INTEGER

vw_td_dbc_tables.sql

Custom DB script for migration of DBC.TABLES

vw_td_dbc_indices.sql

Custom DB script for migration of DBC.INDICES

Table 2 Custom DB scripts (Oracle to GaussDB T)

Script

Description

create_user_and_temptable_enable.sql

Custom DB script for create user and local temporary table is used to address Oracle Package feature.

pkg_variable_scripts.sql

Custom DB script for Oracle package variable functions

Follow the steps to execute custom DB scripts:

  1. Use any of the following methods to execute the required scripts in all target databases for which migration is to be performed:

    • Use gsql.
      • Use gsql to connect to the target database and paste all content in the SQL file to gsql, which will automatically execute the pasted contents.

        Run the following command to connect to the database:

        gsql -h <host_addr_xxx.xxx.xxx.xxx> -d <database_name> -U <user_name> -W <password> -p <port_number> -r
      • Use gsql to connect to the target database and execute a SQL file.

        Run the following command to connect to the database and run the SQL file:

        gsql -h <host_addr_xxx.xxx.xxx.xxx> -d <database_name> -U <user_name>  -W <password>  -p <port_number> -f <filename.sql> -o <output_filename> -L <log_filename.log>  -r
    • Use Data Studio.

      Use Data Studio to connect to the target database, and then open and run the SQL file in Data Studio.

Custom DB Script Configuration

Custom scripts are SQL files used to migrate from Teradata/Oracle the input keywords that do not exist in the target database.

These scripts must be executed in each target database before the migration.

Open the scripts folder in the release package. Table 3 lists the folders and files in the scripts folder.

The SQL files contain the scripts for the custom migration functions. These functions are required to support the specific features of Teradata and Oracle.

Table 3 Custom DB scripts for DSC

Folder

Script File

Description

-- scripts

-

Folder: all scripts

------ oracle

-

Folder: Oracle functions and scripts

-------- sequence

-

Folder: scripts to configure Oracle sequences

-

sequence_scripts.sql

Script: used to enable migration of Oracle sequence

-------- package

-

Folder: scripts to configure Oracle package variables

-

pkg_variable_scripts.sql

Script: used to enable migration of Oracle package variables

-------- function

-

Folder: scripts to configure Oracle system functions

-

date_functions.sql

Script: used to enable migration of Oracle date functions

-

environment_functions.sql

Script: used to enable migration of Oracle environment functions

-

string_functions.sql

Script: used to enable migration of Oracle string functions

------ teradata

-

Folder: Teradata functions and scripts

-------- view

-

Folder: scripts to configure views

-

vw_td_dbc_tables.sql

Script: used to enable migration of Teradata DBC.TABLES

-

vw_td_dbc_indices.sql

Script: used to enable migration of Teradata DBC.INDICES

-------- function

-

Folder: scripts to configure Teradata system functions

-X

mig_fn_get_datatype_short_name.sql

Script: used to enable migration of Teradata DBC.COLUMNS

-

mig_fn_castasint.sql

Script: used to enable migration of CAST AS INTEGER

--------db_scripts

-

Folder: scripts to enable Teradata custom functions

-

mig_fn_get_datatype_short_name.sql

Script: used to enable migration of Teradata DBC.COLUMNS

--------core

-

Folder: Teradata core scripts

-

teradatacore.pm

Script: used to perform Perl migration

Configuring DSC and Migration Properties

To configure DSC, configure parameters in the configuration files in the config folder of DSC. Table 4 describes the parameters.

Table 4 Parameters for configuring DSC

Scenario

Configuration File

Parameter

Teradata SQL Migration

deleteToTruncate=True/False
distributeByHash=one/many
extendedGroupByClause=True/False
inToExists=True/False
rowstoreToColumnstore=True/False
session_mode=Teradata/ANSI
tdMigrateDollar=True/False
tdMigrateALIAS=True/False
tdMigrateNULLIFZero=True/False
tdMigrateZEROIFNULL=True/False
volatile=local temporary/unlogged

Oracle SQL Migration

exceptionHandler=True/False
TxHandler=True/False
foreignKeyHandler=True/False
globalTempTable=GLOBAL/LOCAL
onCommitDeleteRows=Delete/Preserve
maxValInSequence=0..9223372036854775807
mergeImplementation=WITH/SPLIT
RemoveHashPartition=True/False
RemoveHashSubPartition=True/False
RemoveListPartition=True/False
RemoveListSubPartition=True/False
RemoveRangeSubPartition=True/False
MigSupportSequence=True/False

Teradata Perl Migration

add-timing-on=True/False
db-bteq-tag-name=bteq
db-tdsql-tag-name=sql_lang
logging-level=error/warning/info
migrate-variables=True/False
remove-intermediate-files=True/False
target_files=overwrite/cancel
migrate-executequery=True/False

MySQL SQL Migration

table.databaseAsSchema=true
table.defaultSchema=public
table.schema=
table.orientation=ROW
table.type=HASH
table.partition-key.choose.strategy=com.huawei.hwclouds.scs.dws.DWSPartitionKeyChooserStrategy
table.partition-key.name=
table.compress.mode=NOCOMPRESS
table.compress.level=0
table.compress.row=NO
table.compress.column=LOW
table.database.template=template0

Netezza SQL Migration

rowstoreToColumnstore=false

DB2 Syntax Migration

DSC: application.properties

exceptionHandler=True/False
TxHandler=True/False
foreignKeyHandler=True/False
globalTempTable=GLOBAL/LOCAL
onCommitDeleteRows=Delete/Preserve
maxValInSequence=0..9223372036854775807
mergeImplementation=WITH/SPLIT
RemoveHashPartition=True/False
RemoveHashSubPartition=True/False
RemoveListPartition=True/False
RemoveListSubPartition=True/False
RemoveRangeSubPartition=True/False
MigSupportSequence=True/False

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