0

MySQL Workbench 5.2.46CE を使用して、データベースを SQL Server 2008 から MySQL に移行しようとしています。データのコピーまで、すべて正常に動作します (ステップ「一括データ転送」):

開始中...
データ コピー用の情報を準備しています... データ コピー用の
情報を準備しました完了 コピーする行数を決定し ます
....
テーブル内の行数をカウントしています...
-stdin --odbc-source=Driver={SQL Server};Server=.\sqlexpress;Database=... ;User Id=... ;Password=... --table-file=...
エラー:コピーする行数の決定: + のサポートされていないオペランド タイプ: 'NoneType' および 'str'
失敗

なぜこれが得られるのかよくわかりません。もし誰かが考えを持っているなら... :) (PS : 今日から SQL Server 2008 と MySQL Workbench を使い始めたので、それらがどのように機能するかはよくわかりません)

編集 2 - SQL Express テーブル DDL (更新)

CREATE TABLE [dbo].[S_OCivilite](
    [OCIV_Id] [int] IDENTITY(0,1) NOT N'',
    [OCIV_Code_Pan] [nvarchar](3) NOT N'',
    [OCIV_Intitule_Pan] [nvarchar](35) NOT N'',
    [OCIV_DateModif_Pd] [datetime] NOT N'',
 CONSTRAINT [PK_OCIV_Id] PRIMARY KEY CLUSTERED 
(
    [OCIV_Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY],
 CONSTRAINT [IX_OCIV_Code_Pan] UNIQUE NONCLUSTERED 
(
    [OCIV_Code_Pan] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
4

1 に答える 1

1

When moving from one DB to another you will always run into datatype conversion hurdles. In a nutshell you need to understand what table structures are in your source DB and how those map to the same structures in the target DB.All these SQL Databases support or should support ANSI SQL, the collective common aspect of SQL, however each DB vendor has procedural extensions and DDL that makes cross conversion interesting.

So reading your question you do not have SQL Server 2008, but SQL Express which is a "lite" version of SQL Server. Your error is saying that in reading a table to get the row counts it has found a datatype or an unsupported ddl statement and can't handle the typecasting.

I use MySQL workbench, but have not tried to migrate a full DB. You should look for settings that relax the typecasting or send everything into MySQL as a varchar and then have a subsequent ETL process correctly process and typecast the data. Or do a table at a time until you understand what it is truly complaining about.

If you can post the records or record it is complaining about or the table DDL from SQLExpress that would really help.

EDIT 1: Response to SQL DDL edit

I would first off suspect the Identity column in SQL Server. The MySQL corresponding Datatype should be AUTO_INCREMENT . You need to find the logs for Bulk loader. You should be able to set the level of logging and actually see what it is complaining about.

于 2013-03-06T14:55:04.870 に答える