cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MEGA Data Extractor - DataType="SQL_CHAR" always wrong with MS SQL

RGenin
Trusted Contributor

Hello, 

 

We seem to have a problem when we import a database with the MEGA Data Extractor tool.

The DataType is always SQL_CHAR, even if it is never the case:

Example:

<?xml version="1.0" encoding="ISO-8859-1"?>
<XMDB NameId="Xmdb" Version="2.0">
	<DATABASE NameId="Database" DatabaseName="IBORRAWDATA">
		<QUALIFIER NameId="QUALIFIER.SQLPrmSpecific032Qualifier" QualifierValue="">
		</QUALIFIER>
		<TABLE NameId="TABLE.BPIPE" DBBName="BPIPE" Order="9999" Comment="">
			<TBLCOL NameId="TBLCOL.BPIPE.CYCLE095ID" Order="1" DBBName="CYCLE_ID" Comment="" Decimale="NULL" Length="NULL" NotNull="M" DefaultValue="">
				<COLDATATYPE NameId="COLDATATYPE.BPIPE.CYCLE095ID" DataType="SQL_CHAR" TypeTech="SQL_SQL Server 2008bigint"/>
			</TBLCOL>
			<TBLCOL NameId="TBLCOL.BPIPE.SECURITY" Order="2" DBBName="SECURITY" Comment="" Decimale="NULL" Length="50" NotNull="M" DefaultValue="">
				<COLDATATYPE NameId="COLDATATYPE.BPIPE.SECURITY" DataType="SQL_CHAR" TypeTech="SQL_SQL Server 2008varchar"/>
			</TBLCOL>
			<TBLCOL NameId="TBLCOL.BPIPE.ERROR095MESSAGE" Order="3" DBBName="ERROR_MESSAGE" Comment="" Decimale="NULL" Length="400" NotNull="N" DefaultValue="">
				<COLDATATYPE NameId="COLDATATYPE.BPIPE.ERROR095MESSAGE" DataType="SQL_CHAR" TypeTech="SQL_SQL Server 2008varchar"/>
			</TBLCOL>
			<TBLCOL NameId="TBLCOL.BPIPE.LEI095NAME" Order="4" DBBName="LEI_NAME" Comment="" Decimale="NULL" Length="255" NotNull="N" DefaultValue="">
				<COLDATATYPE NameId="COLDATATYPE.BPIPE.LEI095NAME" DataType="SQL_CHAR" TypeTech="SQL_SQL Server 2008varchar"/>
			</TBLCOL>
			<TBLCOL NameId="TBLCOL.BPIPE.LEI095ULTIMATE095PARENT095COMPANY" Order="5" DBBName="LEI_ULTIMATE_PARENT_COMPANY" Comment="" Decimale="NULL" Length="20" NotNull="N" DefaultValue="">
				<COLDATATYPE NameId="COLDATATYPE.BPIPE.LEI095ULTIMATE095PARENT095COMPANY" DataType="SQL_CHAR" TypeTech="SQL_SQL Server 2008varchar"/>
			</TBLCOL>
			<TBLCOL NameId="TBLCOL.BPIPE.DELTA095MID" Order="6" DBBName="DELTA_MID" Comment="" Decimale="6" Length="6" NotNull="N" DefaultValue="">
				<COLDATATYPE NameId="COLDATATYPE.BPIPE.DELTA095MID" DataType="SQL_CHAR" TypeTech="SQL_SQL Server 2008decimal"/>

We tried different ODBC drivers, with always the wrong result:

- ODBC Driver 11 for SQL Server

- ODBC Driver 13 for SQL Server

- SQL Server

- SQL Server Native Client 10.0

- SQL Server Native Client 11.0

 

The server is SQL Microsoft Server 2016 (so should work with ODBC Driver 13), but Mega seems to recognize a SQL Microsoft Server 2008.

 

2019-05-06_12-19-24.png

Is it possible to let the ODBC driver do everything for exemple ? Might it work ?

 

We tried to manually change some DataType before after the Data Extractor tool but before importing to Mega, and it mostly works, but it would be impossbile to do so in our project of importing hundreds of tables. 

 

Thank you

 

6 Replies

RGenin
Trusted Contributor

Case opened.

 

Thank you

 

This a good reason to open a case so that we get a diagnostic 

Please do open a case.

Jerome

RGenin
Trusted Contributor

Hello Jerome, 

 

Thanks for your reply.

 

We actually believe there is a bug in the MEGA Data Extractor present in V2R1U3: we tried the Debug ODBC Reverse (found in https://community.mega.com/t5/custom/page/page-id/mega-kb-solution?sid=50157000000k6RjAAI) and with the exact same parameters, it gives the correct values that we need to extract. Funny, however, there is absolutely no debug log at all.

 

Best, 

Raphaël.

 

This is not a known issue.
Please open a case so that we can perform further investigations.

Jerome

RGenin
Trusted Contributor

Hi Jerome, 

 

Yes, we use the 32-bit driver:

Snag_3706a0c.png

In SQL Server Management Studio, a simple exec sp+columns give the right info:

Snag_3774f4e.png

Thank you.

 

jhorber
MEGA
MEGA

Did you use 32 bit version of the Windows Data source manager (and 32 bit ODBC driver)?

 

Using the MEGA Data extractor requires to create data source.

With all versions of HOPEX (at least up to HOPEX V2R1), it is required to use  the 32 bit version of the Windows Data source manager. This is not so easy to find on 64 bit machines.

 

Run odbcad32.exe from C:\Windows\SysWOW64

Ex: run "C:\Windows\SysWOW64\odbcad32.exe"

Jerome