迁移参数指导
参数说明
| 
        全称  | 
      
        缩写  | 
      
        数据类型  | 
      
        说明  | 
      
        范围  | 
      
        默认值  | 
      
        示例  | 
     
|---|---|---|---|---|---|---|
| 
        --source-db  | 
      
        -S  | 
      
        字符串  | 
      
        源数据库。  | 
      
       
  | 
      
        N/A  | 
      
        --source-db Teradata(or) -S Teradata  | 
     
| 
        --input-folder  | 
      
        -I  | 
      
        字符串  | 
      
        包含Teradata脚本的输入文件夹。  | 
      
        不适用  | 
      
        不适用  | 
      
        --input-folder /home/testmigration/Documentation/input (or) -I /home/testmigration/Documentation/input  | 
     
| 
        --output-folder  | 
      
        -O  | 
      
        字符串  | 
      
        保持迁移后脚本的输出文件夹。  | 
      
        不适用  | 
      
        不适用  | 
      
        --output-folder /home/testmigration/Documentation/output(or)-O /home/testmigration/Documentation/output  | 
     
| 
        --application-lang  | 
      
        -A  | 
      
        字符串  | 
      
        用于迁移的应用程序语言解析器。 SQL:迁移SQL文件中的SQL模式/脚本。 Perl:迁移Perl文件中的BTEQ/SQL_LANG脚本。  | 
      
       
  | 
      
        SQL  | 
      
        --application-lang Perl 或 -A Perl  | 
     
| 
        --conversion-type  | 
      
        -M  | 
      
        字符串  | 
      
        迁移类型。用户需根据输入脚本指定该参数: Bulk:迁移DML和DDL脚本。 BLogic:迁移业务逻辑,如过程和函数。 BLogic仅适用于Oracle PL/SQL。  | 
      
       
  | 
      
        Bulk  | 
      
        --conversion-type ddl 或 -M ddl  | 
     
| 
        --log-folder  | 
      
        -L  | 
      
        字符串  | 
      
        日志文件路径。  | 
      
        不适用  | 
      
        不适用  | 
      
        --log-folder /home/testmigration/Documentation(or)-L /home/testmigration/Documentation  | 
     
| 
        --version-number  | 
      
        -VN  | 
      
        字符串  | 
      
        Oracle必选参数  | 
      
        Oracle  | 
      
        不适用  | 
      
        --version-number 或 -V1R8_330  | 
     
| 
        --target-db  | 
      
        -T  | 
      
        字符串  | 
      
        目标数据库  | 
      
       
  | 
      
        gaussdbA  | 
      
        --target-db gaussdbA (或) -T gaussdbA  | 
     
使用指南
必须指定源数据库、输入和输出文件夹路径。迁移类型和日志路径可选。
 
   如果未指定日志路径,DSC会在TOOL_HOME路径下创建log文件夹,用于存储所有日志。
命令示例
./runDSC.sh --source-db Teradata --input-folder opt/DSC/DSC/input/oracle/ --output-folder /opt/DSC/DSC/output/ --log-folder /opt/DSC/DSC/log/ --application-lang SQL --conversion-type ddl --targetdb gaussdbA
系统回显
********************** Schema Conversion Started ************************* DSC process start time : Mon Jan 20 17:24:49 IST 2020 Statement count progress 100% completed [FILE(1/1)] Schema Conversion Progress 100% completed ************************************************************************** Total number of files in input folder : 1 ************************************************************************** Log file path :....../DSC/DSC/log/dsc.log DSC process end time : Mon Jan 20 17:24:49 IST 2020 DSC total process time : 0 seconds ********************* Schema Conversion Completed ************************
 
   如果输入文件夹中没有SQL文件,则在控制台上会显示如下消息:

环境搭建及恢复(数据库及数据库用户)
创建DWS数据库和schema
- 登录Postgres系统。
    
    
gsql -p <port> -d postgres drop database <database name>; create database <database name>; \c <database name> GRANT ALL PRIVILEGES ON DATABASE <database name> TO <user>; grant database to <user>;\q gsql -p <port> -d <database name> -U <user> -W <password> -h <IP> -f drop database <database name>; create database <database name>; \c <database name>; GRANT ALL PRIVILEGES ON DATABASE <database name> TO <user>; gsql -p <port> -d <database name> -U <user> -W <password> -f
 - 运行Setup目录下的所有文件。
 
命令:
sh runDSC.sh -S oracle -M blogic -I <input path> sh runDSC.sh -I input/ -S oracle -M ddl -L log_temp -P input/bulk/1_table/