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:
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 |
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 Data Studio to connect to the target database, and then open and run the SQL file in Data Studio.
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 |
To configure DSC, configure parameters in the configuration files in the config folder of DSC. Table 3 describes the parameters.
Migration |
Configuration File |
Parameter |
||
---|---|---|---|---|
|
|
|||
|
|
|||
|
|