We had SQL Server 2012 and MySQL Server 8.0.35 on ubuntu. We migrated the SQL Server to 2022 (Windows Server 2022). MySQL server still the same.
Now when I use linked Server with the MySQL server most of my queries on MySQL databases don't work anymore. I get errors like
OLE DB provider 'MSDASQL' supplied inconsistent metadata for a column. the tstamp-column (compile-time ordinal 4) of object "DatabaseName"."SchemaName"."ColumnName" was reported to have a "DBTYPE" of 3 at compile time and 19 at run time.
As @AlwaysLearning pointed out, the datatype of the column is unsigned int. After some research I found documentation for MySQL Connector that stated that unsigned int should be mapped to SQL_INTEGER. Is there someway to configure that behavior?
I tried MySQL Connector ODBC 8.0.25 (like on original SQL Server 2012) / 8.0.32 and 8.2.0 Any help would be great.
Additional info. I know OPENQUERY and that does work for some of our statements but we have quite a lot of statements and some are very complex.