Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread ODBC driver MySQL
Mon, Sep 28 2020 11:49 PMPermanent Link

Graham Mylne

Hi
I am using the trial ODBC driver to connect to MySQL Workbench 8.0.21 - this is being done using a ODBC datasource connecting to a local db - and am receiving the following error upon retrieving the DB schema using the DB Migration Tool in Workbench:
'error calling Python module function DbSql92RE.getCatalogNames'.



The full error log is:



Starting...
Connect to source DBMS...
- Connecting to source...
Connecting to sql92@DRIVER=%driver%;SERVER=%hostName%;PORT=%port%...
Opening ODBC connection to DRIVER={DBISAM 4 ODBC Driver};ConnectionType=local;CatalogName=C:\Dev\500\Data;UID=Admin;PWD=XXXX;...
Connected
Connect to source DBMS done
Check target DBMS connection...
- Connecting to target...
Check target DBMS connection done
Retrieve schema list from source....
- Checking connection...
Connection to sql92@DRIVER=%driver%;SERVER=%hostName%;PORT=%port% apparently lost, reconnecting...
Connecting to sql92@DRIVER=%driver%;SERVER=%hostName%;PORT=%port%...
Opening ODBC connection to DRIVER={DBISAM 4 ODBC Driver};ConnectionType=local;CatalogName=C:\Dev\500\Data;UID=Admin;PWD=XXXX;...
Connected
- Fetching catalog names...
Traceback (most recent call last):
 File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules\db_sql92_re_grt.py", line 368, in getCatalogNames
   return Sql92ReverseEngineering.getCatalogNames(connection)
 File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules\db_sql92_re_grt.py", line 43, in getCatalogNames
   return sorted(list(set(row[0] for row in cls.execute_query(connection, 'SELECT TABLE_CATALOG FROM INFORMATION_SCHEMA.TABLES'))) )
 File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules\db_generic_re_grt.py", line 80, in execute_query
   return cls.get_connection(connection_object).cursor().execute(query, *args, **kwargs)
pyodbc.Error: ('HY000', '[] [Elevate Software][DBISAM] DBISAM Engine Error # 11949 SQL parsing error - Expected end of statement but instead found . in SELECT SQL statement at line 1, column 45 (11949) (SQLExecDirectW)')
Traceback (most recent call last):
 File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\workbench\wizard_progress_page_widget.py", line 197, in thread_work
   self.func()
 File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules\migration_source_selection.py", line 469, in task_fetch_schemata
   self.main.plan.migrationSource.doFetchSchemaNames(only_these_catalogs)
 File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules\migration.py", line 245, in doFetchSchemaNames
   catalog_names = self.getCatalogNames()
 File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules\migration.py", line 209, in getCatalogNames
   return self._rev_eng_module.getCatalogNames(self.connection)
SystemError: Error("('HY000', '[] [Elevate Software][DBISAM] DBISAM Engine Error # 11949 SQL parsing error - Expected end of statement but instead found . in SELECT SQL statement at line 1, column 45 (11949) (SQLExecDirectW)')"): error calling Python module function DbSql92RE.getCatalogNames
ERROR: Retrieve schema list from source: Error("('HY000', '[] [Elevate Software][DBISAM] DBISAM Engine Error # 11949 SQL parsing error - Expected end of statement but instead found . in SELECT SQL statement at line 1, column 45 (11949) (SQLExecDirectW)')"): error calling Python module function DbSql92RE.getCatalogNames
Failed
error calling Python module function DbSql92RE.getCatalogNames.



I have tested the same ODBC Datasource in MS Excel and it retrieves the schema without issue.
Do you have any suggestions of what I could do to fix this issue?
Thanks
Tue, Sep 29 2020 1:32 PMPermanent Link

Raul

Team Elevate Team Elevate

On 9/28/2020 11:49 PM, Graham Mylne wrote:
> Hi
> I am using the trial ODBC driver to connect to MySQL Workbench 8.0.21 - this is being done using a ODBC datasource connecting to a local db - and am receiving the following error upon retrieving the DB schema using the DB Migration Tool in Workbench:
> 'error calling Python module function DbSql92RE.getCatalogNames'.
>
....
>
> I have tested the same ODBC Datasource in MS Excel and it retrieves the schema without issue.
> Do you have any suggestions of what I could do to fix this issue?

I'm not too familiar with DBISAM ODBC (but very familiar with DBISAM)

SELECT TABLE_CATALOG FROM INFORMATION_SCHEMA.TABLES is NOT valid SQL for
DBISAM - table names are single words or need to use \ for specifying
database.

DBISAM is also not catalog based so INFORMATION_SCHEMA does not exist as
internal database (unless you created your own database with such name).

One cannot use SQL to retrieve any schema info from DBISAM - hence i'm
quite curious what worked in Excel for you !?


The ElevateDB product does support this but not DBISAM AFAIK

Raul
Wed, Sep 30 2020 10:07 AMPermanent Link

Fernando Dias

Team Elevate Team Elevate

Graham,

You are using the DBISAM ODBC driver to connect to MySQL?

--
Fernando Dias
[Team Elevate]
Wed, Sep 30 2020 1:36 PMPermanent Link

Raul

Team Elevate Team Elevate

On 9/30/2020 10:07 AM, Fernando Dias wrote:
> You are using the DBISAM ODBC driver to connect to MySQL?
>

I think he is trying to use SQL Workbench tool to migrate DBISAM table
schema and data into MySQL

Raul
Wed, Sep 30 2020 7:22 PMPermanent Link

Graham Mylne

Hi yes it was the workbench, i think it had its own inbuilt queries for the schema. Excel also uses ODBC to connect to dbisam but must be retrieving the data then manually building the schema. Its all fine, we have gone about the project a different way. Thanks for the help.
Image