Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Linked Server to Windows Azure SQL Database Inconsistent Metadata

$
0
0

Some tables return data OK. Some not.

SELECT * FROM OPENQUERY([GAMMA_AZURE], 'SELECT * FROM Sales.SalesOrderHeader');
-- (31466 row(s) affected)
SELECT * FROM [GAMMA_AZURE].AdventureWorks2012.Sales.SalesOrderHeader;
/*
Msg 7356, Level 16, State 1, Line 1
The OLE DB provider "MSDASQL" for linked server "GAMMA_AZURE" supplied inconsistent metadata 
for a column. The column "SubTotal" (compile-time ordinal 20) of object ""AdventureWorks2012"."Sales"."SalesOrderHeader"" was reported 
to have a "DBTYPE" of 131 at compile time and 6 at run time.
*/
SELECT * FROM OPENQUERY([GAMMA_AZURE], 'SELECT * FROM HumanResources.Shift');
/*
Msg 7347, Level 16, State 1, Line 1
OLE DB provider 'MSDASQL' for linked server 'GAMMA_AZURE' returned data that does not match expected 
data length for column '[MSDASQL].StartTime'. The (maximum) expected data length 
is 16, while the returned data length is 12.
*/

SELECT * FROM [GAMMA_AZURE].AdventureWorks2012.HumanResources.Shift;
/*
Msg 7347, Level 16, State 1, Line 1
OLE DB provider 'MSDASQL' for linked server 'GAMMA_AZURE' returned data that does not match 
expected data length for column '[GAMMA_AZURE].[AdventureWorks2012].[HumanResources].[Shift].StartTime'. 
The (maximum) expected data length is 16, while the returned data length is 12.
*/


Kalman Toth Database & OLAP Architect
Paperback / Kindle: Pass SQL Exam 70-461 & Job Interview: Programming SQL Server 2012


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>