MySQL Forums
Forum List  »  MySQL Workbench

SQL Server to MySQL migration script works in CentOS 6.6, but fails partially in CentOS 7.4 for the same MSSQL table
Posted by: Jacob Nikom
Date: February 21, 2018 11:27PM

Hi,

I am migrating data from MSSQL 2017 to MySQL 5.6.39 on CentOS 7.4
Out of 23568 rows the bash migration script successfully migrated 20900, but failed to migrate the remaining 2668 rows with the message:
^@ERROR:`rfcAnalysis`.`houseAddress`:Error during charset conversion of wstring: Success
ERROR:`rfcAnalysis`.`houseAddress`:Failed copying 2668 rows

Here is the full protocol:


shell>copy_migrated_tables_houseAddress_2018_02_21_rhel7.sh
xxx Start bash script to migrate houseAddress table from SQL Server to MySQL rfcAnalysis database Wed Feb 21 22:48:34 EST 2018
Logger set to level 'debug3'. '1111111'
22:48:34 [INF][ copytable]: Connecting to MySQL server at 127.0.0.1:3306 with user root
22:48:34 [INF][ copytable]: Connection to MySQL opened
22:48:34 [DB1][ copytable]: Detected server version=5.6.39-enterprise-commercial-advanced
22:48:34 [DB1][ copytable]: Detected max_allowed_packet=134217728
22:48:34 [DB1][ copytable]: Retrieving trigger list
22:48:34 [INF][ copytable]: Opening ODBC connection to [unknown] 'DRIVER={MyFreeTDSDriver};SERVER=AZSQLDB.invaluable.corp;PORT=1433;DATABASE=rfcAnalysis;UID=*****;TDS_VERSION=7.1;PWD=XXX'
22:48:34 [INF][ copytable]: ODBC connection to 'DRIVER={MyFreeTDSDriver};SERVER=AZSQLDB.invaluable.corp;PORT=1433;DATABASE=rfcAnalysis;UID=OSDprod;TDS_VERSION=7.1;PWD=' opened
22:48:34 [INF][ copytable]: Connecting to MySQL server at 127.0.0.1:3306 with user root
22:48:34 [INF][ copytable]: Connection to MySQL opened
22:48:34 [DB1][ copytable]: Detected server version=5.6.39-enterprise-commercial-advanced
22:48:34 [DB1][ copytable]: Detected max_allowed_packet=134217728
22:48:34 [INF][ copytable]: Opening ODBC connection to [unknown] 'DRIVER={MyFreeTDSDriver};SERVER=AZSQLDB.invaluable.corp;PORT=1433;DATABASE=rfcAnalysis;UID=*****;TDS_VERSION=7.1;PWD=XXX'
22:48:34 [DB1][ copytable]: Executing query: SELECT count(*) FROM [rfcAnalysis].[dbo].[houseAddress]
22:48:34 [DB1][ copytable]: Executing query: SELECT CAST([aRecordStat] as NCHAR(1)) as [aRecordStat], [aAddressID], [aAddressParentID], CAST([aType] as NCHAR(1)) as [aType], [aHouseID], [aSeq], CAST([aPubStatus] as NCHAR(1)) as [aPubStatus], CAST([aUseStatus] as NCHAR(1)) as [aUseStatus], CAST([aContactFirstName] as NVARCHAR(50)) as [aContactFirstName], CAST([aContactLastName] as NVARCHAR(50)) as [aContactLastName], CAST([aTitle] as NVARCHAR(75)) as [aTitle], CAST([aDept] as NVARCHAR(75)) as [aDept], CAST([aLocAlias] as NVARCHAR(100)) as [aLocAlias], [aScraperAlias], CAST([aFacilityName] as NVARCHAR(75)) as [aFacilityName], CAST([aEbayLocAlias] as NVARCHAR(45)) as [aEbayLocAlias], [aHeadOffice], [aBranchOffice], [aSellingLoc], [aSellingDft], [aPreviewLoc], [aPreviewDft], [aOfficeLoc], [aOfficeDft], CAST([aStreet1] as NVARCHAR(75)) as [aStreet1], CAST([aStreet2] as NVARCHAR(75)) as [aStreet2], CAST([aCity] as NVARCHAR(50)) as [aCity], CAST([aStateID] as NVARCHAR(4)) as [aStateID], CAST([aProvince] as NVARCHAR(30)) as [aProvince], CAST([aPostCode] as NVARCHAR(15)) as [aPostCode], CAST([aCountryID] as NVARCHAR(2)) as [aCountryID], CAST([aTelNo] as NVARCHAR(50)) as [aTelNo], CAST([aFaxNo] as NVARCHAR(50)) as [aFaxNo], CAST([aTollFree] as NVARCHAR(20)) as [aTollFree], CAST([aEMail] as NVARCHAR(64)) as [aEMail], [aExpertContactID], [aConsignContactID], [aBiddingContactID], [aCurrencyID], CAST([aTimeZone] as NVARCHAR(4)) as [aTimeZone], [aGMToffset], [aCommIncluded], [aCommissionID], [aDirections], CAST([aBuyPremium] as NVARCHAR(250)) as [aBuyPremium], [aPremiumPlusVAT], CAST([aViewingNotes] as NVARCHAR(2500)) as [aViewingNotes], CAST([aDisplayNotes] as NVARCHAR(2500)) as [aDisplayNotes], CAST([aSaleNotes] as NVARCHAR(2500)) as [aSaleNotes], [aNotes], CAST([aInstructions] as NVARCHAR(1200)) as [aInstructions], CAST([aSourceType] as NVARCHAR(8)) as [aSourceType], CAST([aSourcePath] as NVARCHAR(1000)) as [aSourcePath] FROM [rfcAnalysis].[dbo].[houseAddress] ORDER BY [aAddressID]
22:48:34 [DB2][ copytable]: Columns from source table [rfcAnalysis].[dbo].[houseAddress] (53):
22:48:34 [DB2][ copytable]: 1 - aRecordStat: nchar (type=SQL_WCHAR, len=4)
22:48:34 [DB2][ copytable]: 2 - aAddressID: int (type=SQL_INTEGER, len=10)
22:48:34 [DB2][ copytable]: 3 - aAddressParentID: int (type=SQL_INTEGER, len=10)
22:48:34 [DB2][ copytable]: 4 - aType: nchar (type=SQL_WCHAR, len=4)
22:48:34 [DB2][ copytable]: 5 - aHouseID: int (type=SQL_INTEGER, len=10)
22:48:34 [DB2][ copytable]: 6 - aSeq: smallint (type=SQL_SMALLINT, len=5)
22:48:34 [DB2][ copytable]: 7 - aPubStatus: nchar (type=SQL_WCHAR, len=4)
22:48:34 [DB2][ copytable]: 8 - aUseStatus: nchar (type=SQL_WCHAR, len=4)
22:48:34 [DB2][ copytable]: 9 - aContactFirstName: nvarchar (type=SQL_WVARCHAR, len=200)
22:48:34 [DB2][ copytable]: 10 - aContactLastName: nvarchar (type=SQL_WVARCHAR, len=200)
22:48:34 [DB2][ copytable]: 11 - aTitle: nvarchar (type=SQL_WVARCHAR, len=300)
22:48:34 [DB2][ copytable]: 12 - aDept: nvarchar (type=SQL_WVARCHAR, len=300)
22:48:34 [DB2][ copytable]: 13 - aLocAlias: nvarchar (type=SQL_WVARCHAR, len=400)
22:48:34 [DB2][ copytable]: 14 - aScraperAlias: nvarchar (type=SQL_WVARCHAR, len=400)
22:48:34 [DB2][ copytable]: 15 - aFacilityName: nvarchar (type=SQL_WVARCHAR, len=300)
22:48:34 [DB2][ copytable]: 16 - aEbayLocAlias: nvarchar (type=SQL_WVARCHAR, len=180)
22:48:34 [DB2][ copytable]: 17 - aHeadOffice: bit UNSIGNED (type=SQL_BIT, len=1)
22:48:34 [DB2][ copytable]: 18 - aBranchOffice: bit UNSIGNED (type=SQL_BIT, len=1)
22:48:34 [DB2][ copytable]: 19 - aSellingLoc: bit UNSIGNED (type=SQL_BIT, len=1)
22:48:34 [DB2][ copytable]: 20 - aSellingDft: bit UNSIGNED (type=SQL_BIT, len=1)
22:48:34 [DB2][ copytable]: 21 - aPreviewLoc: bit UNSIGNED (type=SQL_BIT, len=1)
22:48:34 [DB2][ copytable]: 22 - aPreviewDft: bit UNSIGNED (type=SQL_BIT, len=1)
22:48:34 [DB2][ copytable]: 23 - aOfficeLoc: bit UNSIGNED (type=SQL_BIT, len=1)
22:48:34 [DB2][ copytable]: 24 - aOfficeDft: bit UNSIGNED (type=SQL_BIT, len=1)
22:48:34 [DB2][ copytable]: 25 - aStreet1: nvarchar (type=SQL_WVARCHAR, len=300)
22:48:34 [DB2][ copytable]: 26 - aStreet2: nvarchar (type=SQL_WVARCHAR, len=300)
22:48:34 [DB2][ copytable]: 27 - aCity: nvarchar (type=SQL_WVARCHAR, len=200)
22:48:34 [DB2][ copytable]: 28 - aStateID: nvarchar (type=SQL_WVARCHAR, len=16)
22:48:34 [DB2][ copytable]: 29 - aProvince: nvarchar (type=SQL_WVARCHAR, len=120)
22:48:34 [DB2][ copytable]: 30 - aPostCode: nvarchar (type=SQL_WVARCHAR, len=60)
22:48:34 [DB2][ copytable]: 31 - aCountryID: nvarchar (type=SQL_WVARCHAR, len=8)
22:48:34 [DB2][ copytable]: 32 - aTelNo: nvarchar (type=SQL_WVARCHAR, len=200)
22:48:34 [DB2][ copytable]: 33 - aFaxNo: nvarchar (type=SQL_WVARCHAR, len=200)
22:48:34 [DB2][ copytable]: 34 - aTollFree: nvarchar (type=SQL_WVARCHAR, len=80)
22:48:34 [DB2][ copytable]: 35 - aEMail: nvarchar (type=SQL_WVARCHAR, len=256)
22:48:34 [DB2][ copytable]: 36 - aExpertContactID: int (type=SQL_INTEGER, len=10)
22:48:34 [DB2][ copytable]: 37 - aConsignContactID: int (type=SQL_INTEGER, len=10)
22:48:34 [DB2][ copytable]: 38 - aBiddingContactID: int (type=SQL_INTEGER, len=10)
22:48:34 [DB2][ copytable]: 39 - aCurrencyID: tinyint UNSIGNED (type=SQL_TINYINT, len=3)
22:48:34 [DB2][ copytable]: 40 - aTimeZone: nvarchar (type=SQL_WVARCHAR, len=16)
22:48:34 [DB2][ copytable]: 41 - aGMToffset: decimal (type=SQL_NUMERIC, len=3)
22:48:34 [DB2][ copytable]: 42 - aCommIncluded: bit UNSIGNED (type=SQL_BIT, len=1)
22:48:34 [DB2][ copytable]: 43 - aCommissionID: smallint (type=SQL_SMALLINT, len=5)
22:48:34 [DB2][ copytable]: 44 - aDirections: ntext (type=SQL_WLONGVARCHAR, len=4294967292, long_data)
22:48:34 [DB2][ copytable]: 45 - aBuyPremium: nvarchar (type=SQL_WVARCHAR, len=1000)
22:48:34 [DB2][ copytable]: 46 - aPremiumPlusVAT: bit UNSIGNED (type=SQL_BIT, len=1)
22:48:34 [DB2][ copytable]: 47 - aViewingNotes: nvarchar (type=SQL_WVARCHAR, len=10000)
22:48:34 [DB2][ copytable]: 48 - aDisplayNotes: nvarchar (type=SQL_WVARCHAR, len=10000)
22:48:34 [DB2][ copytable]: 49 - aSaleNotes: nvarchar (type=SQL_WVARCHAR, len=10000)
22:48:34 [DB2][ copytable]: 50 - aNotes: ntext (type=SQL_WLONGVARCHAR, len=4294967292, long_data)
22:48:34 [DB2][ copytable]: 51 - aInstructions: nvarchar (type=SQL_WVARCHAR, len=4800)
22:48:34 [DB2][ copytable]: 52 - aSourceType: nvarchar (type=SQL_WVARCHAR, len=32)
22:48:34 [DB2][ copytable]: 53 - aSourcePath: nvarchar (type=SQL_WVARCHAR, len=4000)
BEGIN:`rfcAnalysis`.`houseAddress`:Copying 53 columns of 23568 rows from table [rfcAnalysis].[dbo].[houseAddress]
22:48:34 [DB2][ copytable]: Columns from target table `rfcAnalysis`.`houseAddress` (53) [skipped: 0]:
22:48:34 [DB2][ copytable]: 1 - aRecordStat: MYSQL_TYPE_STRING
22:48:34 [DB2][ copytable]: 2 - aAddressID: MYSQL_TYPE_LONG
22:48:34 [DB2][ copytable]: 3 - aAddressParentID: MYSQL_TYPE_LONG
22:48:34 [DB2][ copytable]: 4 - aType: MYSQL_TYPE_STRING
22:48:34 [DB2][ copytable]: 5 - aHouseID: MYSQL_TYPE_LONG
22:48:34 [DB2][ copytable]: 6 - aSeq: MYSQL_TYPE_SHORT
22:48:34 [DB2][ copytable]: 7 - aPubStatus: MYSQL_TYPE_STRING
22:48:34 [DB2][ copytable]: 8 - aUseStatus: MYSQL_TYPE_STRING
22:48:34 [DB2][ copytable]: 9 - aContactFirstName: MYSQL_TYPE_STRING
22:48:34 [DB2][ copytable]: 10 - aContactLastName: MYSQL_TYPE_STRING
22:48:34 [DB2][ copytable]: 11 - aTitle: MYSQL_TYPE_STRING
22:48:34 [DB2][ copytable]: 12 - aDept: MYSQL_TYPE_STRING
22:48:34 [DB2][ copytable]: 13 - aLocAlias: MYSQL_TYPE_STRING
22:48:34 [DB2][ copytable]: 14 - aScraperAlias: MYSQL_TYPE_STRING
22:48:34 [DB2][ copytable]: 15 - aFacilityName: MYSQL_TYPE_STRING
22:48:34 [DB2][ copytable]: 16 - aEbayLocAlias: MYSQL_TYPE_STRING
22:48:34 [DB2][ copytable]: 17 - aHeadOffice: MYSQL_TYPE_TINY
22:48:34 [DB2][ copytable]: 18 - aBranchOffice: MYSQL_TYPE_TINY
22:48:34 [DB2][ copytable]: 19 - aSellingLoc: MYSQL_TYPE_TINY
22:48:34 [DB2][ copytable]: 20 - aSellingDft: MYSQL_TYPE_TINY
22:48:34 [DB2][ copytable]: 21 - aPreviewLoc: MYSQL_TYPE_TINY
22:48:34 [DB2][ copytable]: 22 - aPreviewDft: MYSQL_TYPE_TINY
22:48:34 [DB2][ copytable]: 23 - aOfficeLoc: MYSQL_TYPE_TINY
22:48:34 [DB2][ copytable]: 24 - aOfficeDft: MYSQL_TYPE_TINY
22:48:34 [DB2][ copytable]: 25 - aStreet1: MYSQL_TYPE_STRING
22:48:34 [DB2][ copytable]: 26 - aStreet2: MYSQL_TYPE_STRING
22:48:34 [DB2][ copytable]: 27 - aCity: MYSQL_TYPE_STRING
22:48:34 [DB2][ copytable]: 28 - aStateID: MYSQL_TYPE_STRING
22:48:34 [DB2][ copytable]: 29 - aProvince: MYSQL_TYPE_STRING
22:48:34 [DB2][ copytable]: 30 - aPostCode: MYSQL_TYPE_STRING
22:48:34 [DB2][ copytable]: 31 - aCountryID: MYSQL_TYPE_STRING
22:48:34 [DB2][ copytable]: 32 - aTelNo: MYSQL_TYPE_STRING
22:48:34 [DB2][ copytable]: 33 - aFaxNo: MYSQL_TYPE_STRING
22:48:34 [DB2][ copytable]: 34 - aTollFree: MYSQL_TYPE_STRING
22:48:34 [DB2][ copytable]: 35 - aEMail: MYSQL_TYPE_STRING
22:48:34 [DB2][ copytable]: 36 - aExpertContactID: MYSQL_TYPE_LONG
22:48:34 [DB2][ copytable]: 37 - aConsignContactID: MYSQL_TYPE_LONG
22:48:34 [DB2][ copytable]: 38 - aBiddingContactID: MYSQL_TYPE_LONG
22:48:34 [DB2][ copytable]: 39 - aCurrencyID: MYSQL_TYPE_TINY
22:48:34 [DB2][ copytable]: 40 - aTimeZone: MYSQL_TYPE_STRING
22:48:34 [DB2][ copytable]: 41 - aGMToffset: MYSQL_TYPE_STRING
22:48:34 [DB2][ copytable]: 42 - aCommIncluded: MYSQL_TYPE_TINY
22:48:34 [DB2][ copytable]: 43 - aCommissionID: MYSQL_TYPE_SHORT
22:48:34 [DB2][ copytable]: 44 - aDirections: MYSQL_TYPE_BLOB
22:48:34 [DB2][ copytable]: 45 - aBuyPremium: MYSQL_TYPE_STRING
22:48:34 [DB2][ copytable]: 46 - aPremiumPlusVAT: MYSQL_TYPE_TINY
22:48:34 [DB2][ copytable]: 47 - aViewingNotes: MYSQL_TYPE_STRING
22:48:34 [DB2][ copytable]: 48 - aDisplayNotes: MYSQL_TYPE_STRING
22:48:34 [DB2][ copytable]: 49 - aSaleNotes: MYSQL_TYPE_STRING
22:48:34 [DB2][ copytable]: 50 - aNotes: MYSQL_TYPE_BLOB
22:48:34 [DB2][ copytable]: 51 - aInstructions: MYSQL_TYPE_STRING
22:48:34 [DB2][ copytable]: 52 - aSourceType: MYSQL_TYPE_STRING
22:48:34 [DB2][ copytable]: 53 - aSourcePath: MYSQL_TYPE_STRING
22:48:34 [INF][ copytable]: Truncating table `rfcAnalysis`.`houseAddress`
22:48:34 [INF][ copytable]: ODBC connection to 'DRIVER={MyFreeTDSDriver};SERVER=AZSQLDB.invaluable.corp;PORT=1433;DATABASE=rfcAnalysis;UID=*****;TDS_VERSION=7.1;PWD=' opened
22:48:34 [INF][ copytable]: Connecting to MySQL server at 127.0.0.1:3306 with user root
22:48:34 [INF][ copytable]: Connection to MySQL opened
22:48:34 [DB1][ copytable]: Detected server version=5.6.39-enterprise-commercial-advanced
22:48:34 [DB1][ copytable]: Detected max_allowed_packet=134217728
^@ERROR:`rfcAnalysis`.`houseAddress`:Error during charset conversion of wstring: Success
ERROR:`rfcAnalysis`.`houseAddress`:Failed copying 2668 rows
22:49:55 [INF][ copytable]: Re-enabling triggers for schema 'rfcAnalysis'
22:49:55 [DB1][ copytable]: Retrieving trigger definitions
22:49:55 [INF][ copytable]: No triggers found for 'rfcAnalysis'
FINISHED
xxx Finshed bash script to migrate houseAddress table from SQL Server to MySQL rfcAnalysis database Wed Feb 21 22:49:55 EST 2018
shell>

Interestingly, I used exactly the same script to migrate data from the same MSSQL table to another MySQL server 5.6.37 on CentOS 6.6 and it performed flawlessly:
shell> copy_migrated_tables_houseAddress_2018_02_21_rhel7.sh
xxx Start bash script to migrate houseAddress table from SQL Server to MySQL rfcAnalysis database Wed Feb 21 23:17:41 EST 2018
23:17:41 [INF][ copytable]: Logger set to level 'debug3'. '0111111'
23:17:41 [INF][ copytable]: Connecting to MySQL server at 127.0.0.1:3306 with user root
23:17:41 [INF][ copytable]: Connection to MySQL opened
23:17:41 [DB1][ copytable]: Detected server version=5.6.37-enterprise-commercial-advanced
23:17:41 [DB1][ copytable]: Detected max_allowed_packet=134217728
23:17:41 [DB1][ copytable]: Retrieving trigger list
23:17:41 [INF][ copytable]: Opening ODBC connection to [unknown] 'DRIVER={MyFreeTDSDriver};SERVER=AZSQLDB.invaluable.corp;PORT=1433;DATABASE=rfcAnalysis;UID=*****;TDS_VERSION=7.1;PWD=XXX'
23:17:46 [INF][ copytable]: ODBC connection to 'DRIVER={MyFreeTDSDriver};SERVER=AZSQLDB.invaluable.corp;PORT=1433;DATABASE=rfcAnalysis;UID=*****;TDS_VERSION=7.1;PWD=' opened
23:17:46 [INF][ copytable]: Connecting to MySQL server at 127.0.0.1:3306 with user root
23:17:46 [INF][ copytable]: Connection to MySQL opened
23:17:46 [DB1][ copytable]: Detected server version=5.6.37-enterprise-commercial-advanced
23:17:46 [DB1][ copytable]: Detected max_allowed_packet=134217728
23:17:46 [INF][ copytable]: Opening ODBC connection to [unknown] 'DRIVER={MyFreeTDSDriver};SERVER=AZSQLDB.invaluable.corp;PORT=1433;DATABASE=rfcAnalysis;UID=*****;TDS_VERSION=7.1;PWD=XXX'
23:17:46 [DB1][ copytable]: Executing query: SELECT count(*) FROM [rfcAnalysis].[dbo].[houseAddress]
23:17:46 [INF][ copytable]: ODBC connection to 'DRIVER={MyFreeTDSDriver};SERVER=AZSQLDB.invaluable.corp;PORT=1433;DATABASE=rfcAnalysis;UID=*****;TDS_VERSION=7.1;PWD=' opened
23:17:46 [INF][ copytable]: Connecting to MySQL server at 127.0.0.1:3306 with user root
23:17:46 [INF][ copytable]: Connection to MySQL opened
23:17:46 [DB1][ copytable]: Detected server version=5.6.37-enterprise-commercial-advanced
23:17:46 [DB1][ copytable]: Detected max_allowed_packet=134217728
23:17:46 [DB1][ copytable]: Executing query: SELECT CAST([aRecordStat] as NCHAR(1)) as [aRecordStat], [aAddressID], [aAddressParentID], CAST([aType] as NCHAR(1)) as [aType], [aHouseID], [aSeq], CAST([aPubStatus] as NCHAR(1)) as [aPubStatus], CAST([aUseStatus] as NCHAR(1)) as [aUseStatus], CAST([aContactFirstName] as NVARCHAR(50)) as [aContactFirstName], CAST([aContactLastName] as NVARCHAR(50)) as [aContactLastName], CAST([aTitle] as NVARCHAR(75)) as [aTitle], CAST([aDept] as NVARCHAR(75)) as [aDept], CAST([aLocAlias] as NVARCHAR(100)) as [aLocAlias], [aScraperAlias], CAST([aFacilityName] as NVARCHAR(75)) as [aFacilityName], CAST([aEbayLocAlias] as NVARCHAR(45)) as [aEbayLocAlias], [aHeadOffice], [aBranchOffice], [aSellingLoc], [aSellingDft], [aPreviewLoc], [aPreviewDft], [aOfficeLoc], [aOfficeDft], CAST([aStreet1] as NVARCHAR(75)) as [aStreet1], CAST([aStreet2] as NVARCHAR(75)) as [aStreet2], CAST([aCity] as NVARCHAR(50)) as [aCity], CAST([aStateID] as NVARCHAR(4)) as [aStateID], CAST([aProvince] as NVARCHAR(30)) as [aProvince], CAST([aPostCode] as NVARCHAR(15)) as [aPostCode], CAST([aCountryID] as NVARCHAR(2)) as [aCountryID], CAST([aTelNo] as NVARCHAR(50)) as [aTelNo], CAST([aFaxNo] as NVARCHAR(50)) as [aFaxNo], CAST([aTollFree] as NVARCHAR(20)) as [aTollFree], CAST([aEMail] as NVARCHAR(64)) as [aEMail], [aExpertContactID], [aConsignContactID], [aBiddingContactID], [aCurrencyID], CAST([aTimeZone] as NVARCHAR(4)) as [aTimeZone], [aGMToffset], [aCommIncluded], [aCommissionID], [aDirections], CAST([aBuyPremium] as NVARCHAR(250)) as [aBuyPremium], [aPremiumPlusVAT], CAST([aViewingNotes] as NVARCHAR(2500)) as [aViewingNotes], CAST([aDisplayNotes] as NVARCHAR(2500)) as [aDisplayNotes], CAST([aSaleNotes] as NVARCHAR(2500)) as [aSaleNotes], [aNotes], CAST([aInstructions] as NVARCHAR(1200)) as [aInstructions], CAST([aSourceType] as NVARCHAR(8)) as [aSourceType], CAST([aSourcePath] as NVARCHAR(1000)) as [aSourcePath] FROM [rfcAnalysis].[dbo].[houseAddress] ORDER BY [aAddressID]
23:17:46 [DB2][ copytable]: Columns from source table [rfcAnalysis].[dbo].[houseAddress] (53):
23:17:46 [DB2][ copytable]: 1 - aRecordStat: nchar (type=SQL_WCHAR, len=4)
23:17:46 [DB2][ copytable]: 2 - aAddressID: int (type=SQL_INTEGER, len=10)
23:17:46 [DB2][ copytable]: 3 - aAddressParentID: int (type=SQL_INTEGER, len=10)
23:17:46 [DB2][ copytable]: 4 - aType: nchar (type=SQL_WCHAR, len=4)
23:17:46 [DB2][ copytable]: 5 - aHouseID: int (type=SQL_INTEGER, len=10)
23:17:46 [DB2][ copytable]: 6 - aSeq: smallint (type=SQL_SMALLINT, len=5)
23:17:46 [DB2][ copytable]: 7 - aPubStatus: nchar (type=SQL_WCHAR, len=4)
23:17:46 [DB2][ copytable]: 8 - aUseStatus: nchar (type=SQL_WCHAR, len=4)
23:17:46 [DB2][ copytable]: 9 - aContactFirstName: nvarchar (type=SQL_WVARCHAR, len=200)
23:17:46 [DB2][ copytable]: 10 - aContactLastName: nvarchar (type=SQL_WVARCHAR, len=200)
23:17:46 [DB2][ copytable]: 11 - aTitle: nvarchar (type=SQL_WVARCHAR, len=300)
23:17:46 [DB2][ copytable]: 12 - aDept: nvarchar (type=SQL_WVARCHAR, len=300)
23:17:46 [DB2][ copytable]: 13 - aLocAlias: nvarchar (type=SQL_WVARCHAR, len=400)
23:17:46 [DB2][ copytable]: 14 - aScraperAlias: nvarchar (type=SQL_WVARCHAR, len=400)
23:17:46 [DB2][ copytable]: 15 - aFacilityName: nvarchar (type=SQL_WVARCHAR, len=300)
23:17:46 [DB2][ copytable]: 16 - aEbayLocAlias: nvarchar (type=SQL_WVARCHAR, len=180)
23:17:46 [DB2][ copytable]: 17 - aHeadOffice: bit UNSIGNED (type=SQL_BIT, len=1)
23:17:46 [DB2][ copytable]: 18 - aBranchOffice: bit UNSIGNED (type=SQL_BIT, len=1)
23:17:46 [DB2][ copytable]: 19 - aSellingLoc: bit UNSIGNED (type=SQL_BIT, len=1)
23:17:46 [DB2][ copytable]: 20 - aSellingDft: bit UNSIGNED (type=SQL_BIT, len=1)
23:17:46 [DB2][ copytable]: 21 - aPreviewLoc: bit UNSIGNED (type=SQL_BIT, len=1)
23:17:46 [DB2][ copytable]: 22 - aPreviewDft: bit UNSIGNED (type=SQL_BIT, len=1)
23:17:46 [DB2][ copytable]: 23 - aOfficeLoc: bit UNSIGNED (type=SQL_BIT, len=1)
23:17:46 [DB2][ copytable]: 24 - aOfficeDft: bit UNSIGNED (type=SQL_BIT, len=1)
23:17:46 [DB2][ copytable]: 25 - aStreet1: nvarchar (type=SQL_WVARCHAR, len=300)
23:17:46 [DB2][ copytable]: 26 - aStreet2: nvarchar (type=SQL_WVARCHAR, len=300)
23:17:46 [DB2][ copytable]: 27 - aCity: nvarchar (type=SQL_WVARCHAR, len=200)
23:17:46 [DB2][ copytable]: 28 - aStateID: nvarchar (type=SQL_WVARCHAR, len=16)
23:17:46 [DB2][ copytable]: 29 - aProvince: nvarchar (type=SQL_WVARCHAR, len=120)
23:17:46 [DB2][ copytable]: 30 - aPostCode: nvarchar (type=SQL_WVARCHAR, len=60)
23:17:46 [DB2][ copytable]: 31 - aCountryID: nvarchar (type=SQL_WVARCHAR, len=8)
23:17:46 [DB2][ copytable]: 32 - aTelNo: nvarchar (type=SQL_WVARCHAR, len=200)
23:17:46 [DB2][ copytable]: 33 - aFaxNo: nvarchar (type=SQL_WVARCHAR, len=200)
23:17:46 [DB2][ copytable]: 34 - aTollFree: nvarchar (type=SQL_WVARCHAR, len=80)
23:17:46 [DB2][ copytable]: 35 - aEMail: nvarchar (type=SQL_WVARCHAR, len=256)
23:17:46 [DB2][ copytable]: 36 - aExpertContactID: int (type=SQL_INTEGER, len=10)
23:17:46 [DB2][ copytable]: 37 - aConsignContactID: int (type=SQL_INTEGER, len=10)
23:17:46 [DB2][ copytable]: 38 - aBiddingContactID: int (type=SQL_INTEGER, len=10)
23:17:46 [DB2][ copytable]: 39 - aCurrencyID: tinyint UNSIGNED (type=SQL_TINYINT, len=3)
23:17:46 [DB2][ copytable]: 40 - aTimeZone: nvarchar (type=SQL_WVARCHAR, len=16)
23:17:46 [DB2][ copytable]: 41 - aGMToffset: decimal (type=SQL_NUMERIC, len=3)
23:17:46 [DB2][ copytable]: 42 - aCommIncluded: bit UNSIGNED (type=SQL_BIT, len=1)
23:17:46 [DB2][ copytable]: 43 - aCommissionID: smallint (type=SQL_SMALLINT, len=5)
23:17:46 [DB2][ copytable]: 44 - aDirections: ntext (type=SQL_WLONGVARCHAR, len=4294967292, long_data)
23:17:46 [DB2][ copytable]: 45 - aBuyPremium: nvarchar (type=SQL_WVARCHAR, len=1000)
23:17:46 [DB2][ copytable]: 46 - aPremiumPlusVAT: bit UNSIGNED (type=SQL_BIT, len=1)
23:17:46 [DB2][ copytable]: 47 - aViewingNotes: nvarchar (type=SQL_WVARCHAR, len=10000)
23:17:46 [DB2][ copytable]: 48 - aDisplayNotes: nvarchar (type=SQL_WVARCHAR, len=10000)
23:17:46 [DB2][ copytable]: 49 - aSaleNotes: nvarchar (type=SQL_WVARCHAR, len=10000)
23:17:46 [DB2][ copytable]: 50 - aNotes: ntext (type=SQL_WLONGVARCHAR, len=4294967292, long_data)
23:17:46 [DB2][ copytable]: 51 - aInstructions: nvarchar (type=SQL_WVARCHAR, len=4800)
23:17:46 [DB2][ copytable]: 52 - aSourceType: nvarchar (type=SQL_WVARCHAR, len=32)
23:17:46 [DB2][ copytable]: 53 - aSourcePath: nvarchar (type=SQL_WVARCHAR, len=4000)
BEGIN:`rfcAnalysis`.`houseAddress`:Copying 53 columns of 23568 rows from table [rfcAnalysis].[dbo].[houseAddress]
23:17:46 [DB2][ copytable]: Columns from target table `rfcAnalysis`.`houseAddress` (53):
23:17:46 [DB2][ copytable]: 1 - aRecordStat: MYSQL_TYPE_STRING
23:17:46 [DB2][ copytable]: 2 - aAddressID: MYSQL_TYPE_LONG
23:17:46 [DB2][ copytable]: 3 - aAddressParentID: MYSQL_TYPE_LONG
23:17:46 [DB2][ copytable]: 4 - aType: MYSQL_TYPE_STRING
23:17:46 [DB2][ copytable]: 5 - aHouseID: MYSQL_TYPE_LONG
23:17:46 [DB2][ copytable]: 6 - aSeq: MYSQL_TYPE_SHORT
23:17:46 [DB2][ copytable]: 7 - aPubStatus: MYSQL_TYPE_STRING
23:17:46 [DB2][ copytable]: 8 - aUseStatus: MYSQL_TYPE_STRING
23:17:46 [DB2][ copytable]: 9 - aContactFirstName: MYSQL_TYPE_STRING
23:17:46 [DB2][ copytable]: 10 - aContactLastName: MYSQL_TYPE_STRING
23:17:46 [DB2][ copytable]: 11 - aTitle: MYSQL_TYPE_STRING
23:17:46 [DB2][ copytable]: 12 - aDept: MYSQL_TYPE_STRING
23:17:46 [DB2][ copytable]: 13 - aLocAlias: MYSQL_TYPE_STRING
23:17:46 [DB2][ copytable]: 14 - aScraperAlias: MYSQL_TYPE_STRING
23:17:46 [DB2][ copytable]: 15 - aFacilityName: MYSQL_TYPE_STRING
23:17:46 [DB2][ copytable]: 16 - aEbayLocAlias: MYSQL_TYPE_STRING
23:17:46 [DB2][ copytable]: 17 - aHeadOffice: MYSQL_TYPE_TINY
23:17:46 [DB2][ copytable]: 18 - aBranchOffice: MYSQL_TYPE_TINY
23:17:46 [DB2][ copytable]: 19 - aSellingLoc: MYSQL_TYPE_TINY
23:17:46 [DB2][ copytable]: 20 - aSellingDft: MYSQL_TYPE_TINY
23:17:46 [DB2][ copytable]: 21 - aPreviewLoc: MYSQL_TYPE_TINY
23:17:46 [DB2][ copytable]: 22 - aPreviewDft: MYSQL_TYPE_TINY
23:17:46 [DB2][ copytable]: 23 - aOfficeLoc: MYSQL_TYPE_TINY
23:17:46 [DB2][ copytable]: 24 - aOfficeDft: MYSQL_TYPE_TINY
23:17:46 [DB2][ copytable]: 25 - aStreet1: MYSQL_TYPE_STRING
23:17:46 [DB2][ copytable]: 26 - aStreet2: MYSQL_TYPE_STRING
23:17:46 [DB2][ copytable]: 27 - aCity: MYSQL_TYPE_STRING
23:17:46 [DB2][ copytable]: 28 - aStateID: MYSQL_TYPE_STRING
23:17:46 [DB2][ copytable]: 29 - aProvince: MYSQL_TYPE_STRING
23:17:46 [DB2][ copytable]: 30 - aPostCode: MYSQL_TYPE_STRING
23:17:46 [DB2][ copytable]: 31 - aCountryID: MYSQL_TYPE_STRING
23:17:46 [DB2][ copytable]: 32 - aTelNo: MYSQL_TYPE_STRING
23:17:46 [DB2][ copytable]: 33 - aFaxNo: MYSQL_TYPE_STRING
23:17:46 [DB2][ copytable]: 34 - aTollFree: MYSQL_TYPE_STRING
23:17:46 [DB2][ copytable]: 35 - aEMail: MYSQL_TYPE_STRING
23:17:46 [DB2][ copytable]: 36 - aExpertContactID: MYSQL_TYPE_LONG
23:17:46 [DB2][ copytable]: 37 - aConsignContactID: MYSQL_TYPE_LONG
23:17:46 [DB2][ copytable]: 38 - aBiddingContactID: MYSQL_TYPE_LONG
23:17:46 [DB2][ copytable]: 39 - aCurrencyID: MYSQL_TYPE_TINY
23:17:46 [DB2][ copytable]: 40 - aTimeZone: MYSQL_TYPE_STRING
23:17:46 [DB2][ copytable]: 41 - aGMToffset: MYSQL_TYPE_STRING
23:17:46 [DB2][ copytable]: 42 - aCommIncluded: MYSQL_TYPE_TINY
23:17:46 [DB2][ copytable]: 43 - aCommissionID: MYSQL_TYPE_SHORT
23:17:46 [DB2][ copytable]: 44 - aDirections: MYSQL_TYPE_BLOB
23:17:46 [DB2][ copytable]: 45 - aBuyPremium: MYSQL_TYPE_STRING
23:17:46 [DB2][ copytable]: 46 - aPremiumPlusVAT: MYSQL_TYPE_TINY
23:17:46 [DB2][ copytable]: 47 - aViewingNotes: MYSQL_TYPE_STRING
23:17:46 [DB2][ copytable]: 48 - aDisplayNotes: MYSQL_TYPE_STRING
23:17:46 [DB2][ copytable]: 49 - aSaleNotes: MYSQL_TYPE_STRING
23:17:46 [DB2][ copytable]: 50 - aNotes: MYSQL_TYPE_BLOB
23:17:46 [DB2][ copytable]: 51 - aInstructions: MYSQL_TYPE_STRING
23:17:46 [DB2][ copytable]: 52 - aSourceType: MYSQL_TYPE_STRING
23:17:46 [DB2][ copytable]: 53 - aSourcePath: MYSQL_TYPE_STRING
23:17:46 [INF][ copytable]: Truncating table `rfcAnalysis`.`houseAddress`
END:`rfcAnalysis`.`houseAddress`:Finished copying 23568 rows in 0m17s
23:18:03 [INF][ copytable]: Re-enabling triggers for schema 'rfcAnalysis'
23:18:03 [DB1][ copytable]: Retrieving trigger definitions
23:18:03 [INF][ copytable]: No triggers found for 'rfcAnalysis'
FINISHED
xxx Finshed bash script to migrate houseAddress table from SQL Server to MySQL rfcAnalysis database Wed Feb 21 23:18:03 EST 2018
shell>

Both MySQL servers configured very similarly in terms of character sets.

# Enable utf8 encoding
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
init_connect = 'SET collation_connection = utf8mb4_unicode_ci'
init_connect = 'SET NAMES utf8mb4'

Why the same script fails in CentOS 7.4?

Could you help me to figure it out?

Thank you,

Jacob

Options: ReplyQuote


Subject
Views
Written By
Posted
SQL Server to MySQL migration script works in CentOS 6.6, but fails partially in CentOS 7.4 for the same MSSQL table
154
February 21, 2018 11:27PM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.