Reprint Please specify source: http://blog.csdn.net/guoyjoe/article/details/44926187
Upload amp Package and unzip: TAR-JXVF Amp.2.1.0.tar
Start Amp:nohup sh start.sh >/tmp/log.txt 1 & >2
1, I deployed the AMP Migration Tool to the 192.168.1.8 , also installed on the 192.168.1.8 MySQL Database, you can connect normally, as follows:
2. Configure AMP, as follows
3, point Save and Pre-check, error is as follows
Case sensitive settings for the target library lower_table_case_name, see what it is?
Mysql> Show variables like '%case% ';
+------------------------+-------+
| variable_name | Value |
+------------------------+-------+
| Lower_case_file_system | OFF |
| Lower_case_table_names | 0 |
+------------------------+-------+
Lower_case_table_names---Case sensitive, Lower_case_table_names=1 makes MySQL case-insensitive!
+-----------------------
VI/U01/MY3306/MY.CNF---Add
Lower_case_table_names=1
Restart MySQL
Mysqld_safe--defaults-file=/u01/mysql3306/my.cnf--user=mysql &
Mysql> Show variables like '%case% ';
+------------------------+-------+
| variable_name | Value |
+------------------------+-------+
| Lower_case_file_system | OFF |
| Lower_case_table_names | 1 |
+------------------------+-------+
Change 0 to 1 and you're done.
After the conversion is completed there are several errors, summarized as follows!
------------------cannot use a function index
Create INDEX Idx_tun on Tb_userbank (TRIM (User_login));
Change
Create INDEX Idx_tun on Tb_userbank (User_login);
CREATE INDEX ' Idx_custno ' on ' dbpay '. ' Tb_finserial ' (' TRIM (Custno) ');
Change
CREATE INDEX ' Idx_custno ' on ' dbpay '. ' Tb_finserial ' (' Ustno ');
CREATE INDEX ' Idx_func_charge_pay_bill ' on ' dbcharge '. ' Charge_pay_bill ' (' SUBSTR (order_id,2,16) ');
Change
CREATE INDEX ' Idx_func_charge_pay_bill ' on ' dbcharge '. ' Charge_pay_bill ' (' order_id ');
The field default value in the-----------------table cannot be used To_char (sysdate, ' YYYYMMDD ')
CREATE TABLE Tb_orderinfo
(
Oid_billno VARCHAR (32),
order_id VARCHAR (+) NOT NULL,
OID_CHNL VARCHAR (2) NOT NULL,
TYPE_DC VARCHAR (1) NOT NULL,
Oid_reguser VARCHAR (+) NOT NULL,
Dt_sys DATE,
Trans_date CHAR (8) Default To_char (sysdate, ' YYYYMMDD ') NOT NULL
);
Change
CREATE TABLE Tb_orderinfo
(
Oid_billno VARCHAR (32),
order_id VARCHAR (+) NOT NULL,
OID_CHNL VARCHAR (2) NOT NULL,
TYPE_DC VARCHAR (1) NOT NULL,
Oid_reguser VARCHAR (+) NOT NULL,
Dt_sys DATE,
Trans_date CHAR (8) NOT NULL
);
-----------------Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. Some columns to TEXT or BLOBs
CREATE TABLE IF not EXISTS ' dbpay '. ' Sys_export_schema_01 ' (
' Process_order ' BIGINT,
' DUPLICATE ' BIGINT,
' Dump_fileid ' BIGINT,
' Dump_position ' BIGINT,
' Dump_length ' BIGINT,
' Dump_allocation ' BIGINT,
' Completed_rows ' BIGINT,
' Error_count ' BIGINT,
' Elapsed_time ' BIGINT,
' Object_type_path ' VARCHAR (200),
' Object_path_seqno ' BIGINT,
' Object_type ' VARCHAR (30),
' In_progress ' CHAR (1),
' object_name ' VARCHAR (500),
' Object_long_name ' VARCHAR (4000),
' Object_schema ' VARCHAR (30),
' Original_object_schema ' VARCHAR (30),
' Partition_name ' VARCHAR (30),
' Subpartition_name ' VARCHAR (30),
' FLAGS ' BIGINT,
' Property ' BIGINT,
' Completion_time ' DATETIME,
' Object_tablespace ' VARCHAR (30),
' Size_estimate ' BIGINT,
' Object_row ' BIGINT,
' Processing_state ' CHAR (1),
' Processing_status ' CHAR (1),
' Base_process_order ' BIGINT,
' Base_object_type ' VARCHAR (30),
' Base_object_name ' VARCHAR (30),
' Base_object_schema ' VARCHAR (30),
' Ancestor_process_order ' BIGINT,
' Domain_process_order ' BIGINT,
' Parallelization ' BIGINT,
' Unload_method ' BIGINT,
' Granules ' BIGINT,
' SCN ' BIGINT,
' Grantor ' VARCHAR (30),
' Xml_clob ' Longtext,
' NAME ' VARCHAR (30),
' value_t ' VARCHAR (4000),
' Value_n ' BIGINT,
' Is_default ' BIGINT,
' File_type ' BIGINT,
' User_directory ' VARCHAR (4000),
' User_file_name ' VARCHAR (4000),
' file_name ' VARCHAR (4000),
' Extend_size ' BIGINT,
' File_max_size ' BIGINT,
' Process_name ' VARCHAR (30),
' Last_update ' DATETIME,
' Work_item ' VARCHAR (30),
' Object_number ' BIGINT,
' Completed_bytes ' BIGINT,
' Total_bytes ' BIGINT,
' Metadata_io ' BIGINT,
' Data_io ' BIGINT,
' Cumulative_time ' BIGINT,
' Packet_number ' BIGINT,
' Old_value ' VARCHAR (4000),
' SEED ' BIGINT,
' Last_file ' BIGINT,
' User_name ' VARCHAR (30),
' Operation ' VARCHAR (30),
' Job_mode ' VARCHAR (30),
' Control_queue ' VARCHAR (30),
' Status_queue ' VARCHAR (30),
' Remote_link ' VARCHAR (4000),
' VERSION ' BIGINT,
' Db_version ' VARCHAR (30),
' TIMEZONE ' VARCHAR (64),
' State ' VARCHAR (30),
' PHASE ' BIGINT,
' GUID ' VARBINARY (16),
' Start_time ' DATETIME,
' Block_size ' BIGINT,
' Metadata_buffer_size ' BIGINT,
' Data_buffer_size ' BIGINT,
' Degree ' BIGINT,
' PLATFORM ' VARCHAR (101),
' Abort_step ' BIGINT,
' INSTANCE ' VARCHAR (60)
) Engine=innodb Charset=utf8 COLLATE utf8_bin comment = ' Data Pump Master Table EXPORT SCHEMA ‘;
The main change of varchar (500) more than 500 to the text
CREATE TABLE IF not EXISTS ' dbpay '. ' Sys_export_schema_01 ' (
' Process_order ' BIGINT,
' DUPLICATE ' BIGINT,
' Dump_fileid ' BIGINT,
' Dump_position ' BIGINT,
' Dump_length ' BIGINT,
' Dump_allocation ' BIGINT,
' Completed_rows ' BIGINT,
' Error_count ' BIGINT,
' Elapsed_time ' BIGINT,
' Object_type_path ' VARCHAR (200),
' Object_path_seqno ' BIGINT,
' Object_type ' VARCHAR (30),
' In_progress ' CHAR (1),
' object_name ' TEXT (500),
' Object_long_name ' TEXT (4000),
' Object_schema ' VARCHAR (30),
' Original_object_schema ' VARCHAR (30),
' Partition_name ' VARCHAR (30),
' Subpartition_name ' VARCHAR (30),
' FLAGS ' BIGINT,
' Property ' BIGINT,
' Completion_time ' DATETIME,
' Object_tablespace ' VARCHAR (30),
' Size_estimate ' BIGINT,
' Object_row ' BIGINT,
' Processing_state ' CHAR (1),
' Processing_status ' CHAR (1),
' Base_process_order ' BIGINT,
' Base_object_type ' VARCHAR (30),
' Base_object_name ' VARCHAR (30),
' Base_object_schema ' VARCHAR (30),
' Ancestor_process_order ' BIGINT,
' Domain_process_order ' BIGINT,
' Parallelization ' BIGINT,
' Unload_method ' BIGINT,
' Granules ' BIGINT,
' SCN ' BIGINT,
' Grantor ' VARCHAR (30),
' Xml_clob ' Longtext,
' NAME ' VARCHAR (30),
' value_t ' VARCHAR (4000),
' Value_n ' BIGINT,
' Is_default ' BIGINT,
' File_type ' BIGINT,
' User_directory ' TEXT (4000),
' User_file_name ' TEXT (4000),
' file_name ' TEXT (4000),
' Extend_size ' BIGINT,
' File_max_size ' BIGINT,
' Process_name ' VARCHAR (30),
' Last_update ' DATETIME,
' Work_item ' VARCHAR (30),
' Object_number ' BIGINT,
' Completed_bytes ' BIGINT,
' Total_bytes ' BIGINT,
' Metadata_io ' BIGINT,
' Data_io ' BIGINT,
' Cumulative_time ' BIGINT,
' Packet_number ' BIGINT,
' Old_value ' TEXT (4000),
' SEED ' BIGINT,
' Last_file ' BIGINT,
' User_name ' VARCHAR (30),
' Operation ' VARCHAR (30),
' Job_mode ' VARCHAR (30),
' Control_queue ' VARCHAR (30),
' Status_queue ' VARCHAR (30),
' Remote_link ' TEXT (4000),
' VERSION ' BIGINT,
' Db_version ' VARCHAR (30),
' TIMEZONE ' VARCHAR (64),
' State ' VARCHAR (30),
' PHASE ' BIGINT,
' GUID ' VARBINARY (16),
' Start_time ' DATETIME,
' Block_size ' BIGINT,
' Metadata_buffer_size ' BIGINT,
' Data_buffer_size ' BIGINT,
' Degree ' BIGINT,
' PLATFORM ' VARCHAR (101),
' Abort_step ' BIGINT,
' INSTANCE ' VARCHAR (60)
) Engine=innodb Charset=utf8 COLLATE utf8_bin comment = ' Data Pump Master Table EXPORT SCHEMA ‘;
Error failure reason [Specified key was too long; Max key length is 767 bytes]: meaning if this field is longer than 255, the index will have a warning:
CREATE INDEX ' name_list_index1 ' on ' dbrisk '. ' Name_list ' (' unique_id ');
CREATE TABLE Name_list
(
ID number (+) is not NULL,
unique_id VARCHAR2 () NOT NULL,
NAME VARCHAR2 (255),
STATUS Number (2) default 0,
EXPIRES TIMESTAMP (6),
COMMENTS VARCHAR2 (255),
SOURCE VARCHAR2 (255),
TAG VARCHAR2 (255) is not NULL,
TYPE VARCHAR2 (20),
Create_time TIMESTAMP (6),
Update_time TIMESTAMP (6),
Tag_2 VARCHAR2 (256),
Risk_type VARCHAR2 (20),
Risk_role VARCHAR2 (20),
Opr_name VARCHAR2 (255),
Risk_source VARCHAR2 (20)
)
Turn unique_id VARCHAR2 () not NULL, make less than 256 will not error.
CREATE INDEX ' name_list_index1 ' on ' dbrisk '. ' Name_list ' (' unique_id ');
Easily migrate data from Oracle database to MySQL database with amp (Alibaba migration platfrom) artifact