2016-09-28 63 views
2

我試圖用MySQL Workbench遷移工具將數據庫從Sybase遷移到MySQL將數據庫從Sybase遷移到MySQL:「調用Python模塊函數錯誤DbSQLAnywhereRE.reverseEngineer」

我連接數據源和目標數據庫沒有問題,但是當它開始遷移時,我從日誌消息中得到以下問題。

Starting...
Connect to source DBMS...
- Connecting...
Connect to source DBMS done
Reverse engineer selected schemas....
Reverse engineering DBA, SYS, dbo, rs_systabgroup from corsi
- Reverse engineering catalog information
- Preparing...
Traceback (most recent call last):
File "C:\Program Files (x86)\MySQL\MySQL Workbench 6.3
CE\modules\db_sqlanywhere_re_grt.py", line 489, in reverseEngineer
return SQLAnywhereReverseEngineering.reverseEngineer(connection, catalog_name, schemata_list, context)
File "C:\Program Files (x86)\MySQL\MySQL Workbench 6.3 CE\modules\db_sqlanywhere_re_grt.py", line 169, in reverseEngineer catalog = super(SQLAnywhereReverseEngineering, cls).reverseEngineer(connection, '', schemata_list, context)
File "C:\Program Files (x86)\MySQL\MySQL Workbench 6.3 CE\modules\db_generic_re_grt.py", line 258, in reverseEngineer table_count_per_schema[schema_name] = len(cls.getTableNames(connection, catalog_name, schema_name)) if get_tables else 0
File "C:\Program Files (x86)\MySQL\MySQL Workbench 6.3 CE\modules\db_sqlanywhere_re_grt.py", line 41, in wrapped_method res = method(cls, connection, *args)
File "C:\Program Files (x86)\MySQL\MySQL Workbench 6.3 CE\modules\db_sqlanywhere_re_grt.py", line 145, in getTableNames return [row[0] for row in cls.execute_query(connection, query)]
File "C:\Program Files (x86)\MySQL\MySQL Workbench 6.3 CE\modules\db_generic_re_grt.py", line 76, in execute_query return cls.get_connection(connection_object).cursor().execute(query, *args, **kwargs) pyodbc.ProgrammingError: ('42S02', "[42S02] [Sybase][ODBC Driver][Adaptive Server Anywhere]Table or view not found: Table 'SYSTAB' not found (-141) (SQLExecDirectW)")

Traceback (most recent call last):
File "C:\Program Files (x86)\MySQL\MySQL Workbench 6.3 CE\workbench\wizard_progress_page_widget.py", line 192, in thread_work self.func()
File "C:\Program Files (x86)\MySQL\MySQL Workbench 6.3 CE\modules\migration_schema_selection.py", line 175, in task_reveng self.main.plan.migrationSource.reverseEngineer()
File "C:\Program Files (x86)\MySQL\MySQL Workbench 6.3 CE\modules\migration.py", line 369, in reverseEngineer self.state.sourceCatalog = self._rev_eng_module.reverseEngineer(self.connection, self.selectedCatalogName, self.selectedSchemataNames, self.state.applicationData) SystemError: ProgrammingError("('42S02', "[42S02] [Sybase][ODBC Driver][Adaptive Server Anywhere]Table or view not found: Table 'SYSTAB' not found (-141) (SQLExecDirectW)")"): error calling Python module function DbSQLAnywhereRE.reverseEngineer
ERROR: Reverse engineer selected schemas: ProgrammingError("('42S02', "[42S02] [Sybase][ODBC Driver][Adaptive Server Anywhere]Table or view not found: Table 'SYSTAB' not found (-141) (SQLExecDirectW)")"): error calling Python module function DbSQLAnywhereRE.reverseEngineer
Failed

我該如何解決這個問題?

回答

0

這是因爲SQL獲取表名。看看db_sqlanywhere_re_grt.py:142,有:

SELECT st.table_name 
FROM SYSTAB st LEFT JOIN SYSUSER su ON st.creator=su.user_id 
WHERE su.user_name = '%s' AND st.table_type = 1 

這是對於SQL Anywhere < 10版本有效的SQL,我想你有最新的版本。因此,您可以使用兼容的SQL編輯和更新該文件。 請記住,還有更多的SQL也需要在該文件中更新。 與此同時,請填寫錯誤報告bugs.mysql.com