Prerequisites
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.
Script |
Description |
---|---|
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 |
Follow the steps to execute custom DB scripts:
- 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:
1
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:
1
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 gsql to connect to the target database and paste all content in the SQL file to gsql, which will automatically execute the pasted contents.
- Use Data Studio.
Use Data Studio to connect to the target database, and then open and run the SQL file in Data Studio.
- Use gsql.
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 2 lists the folders and files in the scripts folder.
The SQL files contain the scripts for the custom migration functions. The GaussDB(DWS) database needs to use these functions to support specific features of Teradata.
Folder |
Script File |
Description |
---|---|---|
-- scripts |
- |
Folder: all scripts |
------ 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 3 describes the parameters.
Migration |
Configuration File |
Parameter |
||
---|---|---|---|---|
|
|
|||
|
|
|||
|
|
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