%3CLINGO-SUB%20id%3D%22lingo-sub-911485%22%20slang%3D%22en-US%22%3ERe%3A%20Released%3A%20Update%20to%20Microsoft%20OLE%20DB%20Driver%2018%20for%20SQL%20Server%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-911485%22%20slang%3D%22en-US%22%3E%3CP%3EWhat's%20the%20correct%20channel%20for%20reporting%20bugs%20with%20the%20MSOLEDBSQL%20driver%3F%20This%20SQL%20Server%20feedback%20item%20has%20been%20open%20since%20Sep%202018%20but%20I'm%20not%20sure%20whether%20it's%20got%20back%20to%20the%20team%20responsible%20for%20that%20driver.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ffeedback.azure.com%2Fforums%2F908035-sql-server%2Fsuggestions%2F35400568-msoledbsql%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Ffeedback.azure.com%2Fforums%2F908035-sql-server%2Fsuggestions%2F35400568-msoledbsql%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20issue%20affects%20SQL%20Server%20linked%20servers%20that%20use%20this%20driver%20-%20simple%20SELECTs%20from%20a%20remote%20table%2Fview%20using%20such%20a%20linked%20server%20fail%20with%26nbsp%3B%22Microsoft%20Distributed%20Transaction%20Coordinator%20(MS%20DTC)%20has%20stopped%20this%20transaction.%22%20unless%20you%20first%20begin%20an%20explicit%20distributed%20transaction.%20The%20issue%20doesn't%20seem%20to%20affect%20INSERTs%2FUPDATEs%2FDELETEs%20to%20a%20remote%20table%20or%20EXECing%20a%20remote%20proc%20strangely%2C%20which%20work%20fine%20without%20the%20explicit%20distributed%20transaction.%20The%20issue%20is%20not%20present%20in%20linked%20servers%20that%20use%20the%20older%20SQLNCLI11%20or%20SQLOLEDB%20drivers.%20Repro'ed%20with%20versions%2018.2.1%20and%2018.2.2%20of%20MSOLEDBSQL.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-912985%22%20slang%3D%22en-US%22%3ERe%3A%20Released%3A%20Update%20to%20Microsoft%20OLE%20DB%20Driver%2018%20for%20SQL%20Server%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-912985%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F425394%22%20target%3D%22_blank%22%3E%40jluebbers%3C%2FA%3E%26nbsp%3BYou%20would%20need%20to%20contact%20MS%20support%20and%20they%20would%20file%20an%20issue.%20However%2C%20a%20customer%20just%20bubbled%20this%20up%20to%20our%20attention%20last%20week.%20We%20are%20waiting%20for%20more%20information%20to%20reproduce%20the%20issue.%20For%20reference%2C%20select%20*%20from%20server.master.sys.databases%20works%20fine%20for%20me%20using%20version%2018.2.1%20of%20the%20driver%20and%20SQL%20Server%202017%20CU%2017.%20If%20you%20have%20a%20linked%20server%20creation%20script%20and%20version%20details%20which%20repro%20the%20issue%2C%20I'd%20be%20happy%20to%20forward%20it%20on%20to%20the%20team.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDavid%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-914298%22%20slang%3D%22en-US%22%3ERe%3A%20Released%3A%20Update%20to%20Microsoft%20OLE%20DB%20Driver%2018%20for%20SQL%20Server%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-914298%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F343280%22%20target%3D%22_blank%22%3E%40David-Engel%3C%2FA%3E%26nbsp%3B%20Thanks%20-%20there%20doesn't%20seem%20to%20be%20a%20way%20to%20attach%20files%20here%20in%20the%20comments%20so%20I've%20tried%20to%20upload%20a%20repro%20script%20in%20the%20Azure%20feedback%20forum%20I%20linked%20above.%20My%20comments%20there%20are%20awaiting%20moderator%20approval%20so%20I'll%20repeat%20them%20here%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERepro%20script%20attached.%20We%20have%20tested%20this%20between%20a%20few%20different%20versions%20of%20SQL%20Server%2C%20all%20running%20on%20Windows%20Server%202016%20(with%20current%20updates%20installed)%20and%20MSOLEDBSQL%20driver%2018.2.2.0%20installed%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E***%20ISSUE%20PRESENT%20-%20MS%20DTC%20ERROR%20ON%20SELECT%20***%3CBR%20%2F%3ELocal%20Server%3A%20Microsoft%20SQL%20Server%202014%20(SP3-CU3)%20(KB4491539)%20-%2012.0.6259.0%3CBR%20%2F%3ERemote%20Server%3A%20Microsoft%20SQL%20Server%202014%20(SP3-CU2)%20(KB4482960)%20-%2012.0.6214.1%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E***%20ISSUE%20PRESENT%20-%20MS%20DTC%20ERROR%20ON%20SELECT%20***%3C%2FP%3E%3CP%3ELocal%20Server%3A%20Microsoft%20SQL%20Server%202014%20(SP3-CU3)%20(KB4491539)%20-%2012.0.6259.0%3CBR%20%2F%3ERemote%20Server%3A%20Microsoft%20SQL%20Server%202017%20(RTM-CU15-GDR)%20(KB4505225)%20-%2014.0.3192.2%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E***%20NO%20ISSUE%20-%20SELECT%20WORKS%20NORMALLY%20***%3CBR%20%2F%3ELocal%20Server%3A%20Microsoft%20SQL%20Server%202017%20(RTM-CU15-GDR)%20(KB4505225)%20-%2014.0.3192.2%3CBR%20%2F%3ERemote%20Server%3A%20Microsoft%20SQL%20Server%202014%20(SP3-CU3)%20(KB4491539)%20-%2012.0.6259.0%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E***%20NO%20ISSUE%20-%20SELECT%20WORKS%20NORMALLY%20***%3CBR%20%2F%3ELocal%20Server%3A%20Microsoft%20SQL%20Server%202017%20(RTM-CU15-GDR)%20(KB4505225)%20-%2014.0.3192.2%3CBR%20%2F%3ERemote%20Server%3A%20Microsoft%20SQL%20Server%202017%20(RTM-CU15-GDR)%20(KB4505225)%20-%2014.0.3192.2%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20seems%20that%20the%20bug%20is%20present%20when%20the%20driver%20is%20used%20from%20a%20linked%20server%20on%20SQL%20Server%202014%20instance.%20The%20other%20way%20around%20seems%20fine%20-%20if%20the%20local%20server%20is%20SQL%20Server%202017%20the%20bug%20isn't%20present.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-914322%22%20slang%3D%22en-US%22%3ERe%3A%20Released%3A%20Update%20to%20Microsoft%20OLE%20DB%20Driver%2018%20for%20SQL%20Server%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-914322%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F343280%22%20target%3D%22_blank%22%3E%40David-Engel%3C%2FA%3E%26nbsp%3Brepro%20script%20pasted%20here%2C%20hopefully%20this%20doesn't%20get%20eaten%20by%20the%20comments%20form%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESET%20ANSI_NULLS%20ON%3CBR%20%2F%3EGO%3CBR%20%2F%3ESET%20QUOTED_IDENTIFIER%20ON%3CBR%20%2F%3EGO%3C%2FP%3E%3CP%3EUSE%20%5Bmaster%5D%3CBR%20%2F%3EGO%3C%2FP%3E%3CP%3EEXEC%20master.dbo.sp_addlinkedserver%20%40server%20%3D%20N'MyLinkedServer'%2C%20%40srvproduct%3DN''%2C%20%3Ca%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F555695%22%3E%40Provider%3C%2Fa%3E%3DN'MSOLEDBSQL'%2C%20%40provstr%3DN'Server%3Dremoteinstance.mydomain.local%3BMultiSubnetFailover%3DYes%3B'%3CBR%20%2F%3EGO%3C%2FP%3E%3CP%3EEXEC%20master.dbo.sp_addlinkedsrvlogin%20%40rmtsrvname%3DN'MyLinkedServer'%2C%40useself%3DN'True'%2C%40locallogin%3DNULL%2C%40rmtuser%3DNULL%2C%40rmtpassword%3DNULL%3CBR%20%2F%3EGO%3C%2FP%3E%3CP%3EEXEC%20master.dbo.sp_serveroption%20%40server%3DN'MyLinkedServer'%2C%20%40optname%3DN'collation%20compatible'%2C%20%40optvalue%3DN'true'%3CBR%20%2F%3EGO%3C%2FP%3E%3CP%3EEXEC%20master.dbo.sp_serveroption%20%40server%3DN'MyLinkedServer'%2C%20%40optname%3DN'data%20access'%2C%20%40optvalue%3DN'true'%3CBR%20%2F%3EGO%3C%2FP%3E%3CP%3EEXEC%20master.dbo.sp_serveroption%20%40server%3DN'MyLinkedServer'%2C%20%40optname%3DN'dist'%2C%20%40optvalue%3DN'false'%3CBR%20%2F%3EGO%3C%2FP%3E%3CP%3EEXEC%20master.dbo.sp_serveroption%20%40server%3DN'MyLinkedServer'%2C%20%40optname%3DN'pub'%2C%20%40optvalue%3DN'false'%3CBR%20%2F%3EGO%3C%2FP%3E%3CP%3EEXEC%20master.dbo.sp_serveroption%20%40server%3DN'MyLinkedServer'%2C%20%40optname%3DN'rpc'%2C%20%40optvalue%3DN'true'%3CBR%20%2F%3EGO%3C%2FP%3E%3CP%3EEXEC%20master.dbo.sp_serveroption%20%40server%3DN'MyLinkedServer'%2C%20%40optname%3DN'rpc%20out'%2C%20%40optvalue%3DN'true'%3CBR%20%2F%3EGO%3C%2FP%3E%3CP%3EEXEC%20master.dbo.sp_serveroption%20%40server%3DN'MyLinkedServer'%2C%20%40optname%3DN'sub'%2C%20%40optvalue%3DN'false'%3CBR%20%2F%3EGO%3C%2FP%3E%3CP%3EEXEC%20master.dbo.sp_serveroption%20%40server%3DN'MyLinkedServer'%2C%20%40optname%3DN'connect%20timeout'%2C%20%40optvalue%3DN'0'%3CBR%20%2F%3EGO%3C%2FP%3E%3CP%3EEXEC%20master.dbo.sp_serveroption%20%40server%3DN'MyLinkedServer'%2C%20%40optname%3DN'collation%20name'%2C%20%40optvalue%3Dnull%3CBR%20%2F%3EGO%3C%2FP%3E%3CP%3EEXEC%20master.dbo.sp_serveroption%20%40server%3DN'MyLinkedServer'%2C%20%40optname%3DN'lazy%20schema%20validation'%2C%20%40optvalue%3DN'false'%3CBR%20%2F%3EGO%3C%2FP%3E%3CP%3EEXEC%20master.dbo.sp_serveroption%20%40server%3DN'MyLinkedServer'%2C%20%40optname%3DN'query%20timeout'%2C%20%40optvalue%3DN'0'%3CBR%20%2F%3EGO%3C%2FP%3E%3CP%3EEXEC%20master.dbo.sp_serveroption%20%40server%3DN'MyLinkedServer'%2C%20%40optname%3DN'use%20remote%20collation'%2C%20%40optvalue%3DN'true'%3CBR%20%2F%3EGO%3C%2FP%3E%3CP%3EEXEC%20master.dbo.sp_serveroption%20%40server%3DN'MyLinkedServer'%2C%20%40optname%3DN'remote%20proc%20transaction%20promotion'%2C%20%40optvalue%3DN'true'%3CBR%20%2F%3EGO%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E%2F*%3CBR%20%2F%3Ethis%20fails%20with%3A%3C%2FP%3E%3CP%3EMsg%208522%2C%20Level%2016%2C%20State%203%2C%20Line%2050%3CBR%20%2F%3EMicrosoft%20Distributed%20Transaction%20Coordinator%20(MS%20DTC)%20has%20stopped%20this%20transaction.%3CBR%20%2F%3E*%2F%3CBR%20%2F%3ESELECT%20TOP%2010%3CBR%20%2F%3E*%3CBR%20%2F%3EFROM%20%5BMyLinkedServer%5D.%5Bmaster%5D.%5Bsys%5D.%5Bdatabases%5D%3CBR%20%2F%3EGO%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%2F*%3CBR%20%2F%3Ethis%20succeeds%3CBR%20%2F%3E*%2F%3CBR%20%2F%3EBEGIN%20DISTRIBUTED%20TRANSACTION%3CBR%20%2F%3ESELECT%20TOP%2010%3CBR%20%2F%3E*%3CBR%20%2F%3EFROM%20%5BMyLinkedServer%5D.%5Bmaster%5D.%5Bsys%5D.%5Bdatabases%5D%3CBR%20%2F%3ECOMMIT%20TRANSACTION%3CBR%20%2F%3EGO%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-914323%22%20slang%3D%22en-US%22%3ERe%3A%20Released%3A%20Update%20to%20Microsoft%20OLE%20DB%20Driver%2018%20for%20SQL%20Server%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-914323%22%20slang%3D%22en-US%22%3E%3CP%3EWe%20have%20tested%20this%20between%20a%20few%20different%20versions%20of%20SQL%20Server%2C%20all%20running%20on%20Windows%20Server%202016%20(with%20current%20updates%20installed)%20and%20MSOLEDBSQL%20driver%2018.2.2.0%20installed%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E***%20ISSUE%20PRESENT%20-%20MS%20DTC%20ERROR%20ON%20SELECT%20***%3CBR%20%2F%3ELocal%20Server%3A%20Microsoft%20SQL%20Server%202014%20(SP3-CU3)%20(KB4491539)%20-%2012.0.6259.0%3CBR%20%2F%3ERemote%20Server%3A%20Microsoft%20SQL%20Server%202014%20(SP3-CU2)%20(KB4482960)%20-%2012.0.6214.1%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E***%20ISSUE%20PRESENT%20-%20MS%20DTC%20ERROR%20ON%20SELECT%20***%3CBR%20%2F%3ELocal%20Server%3A%20Microsoft%20SQL%20Server%202014%20(SP3-CU3)%20(KB4491539)%20-%2012.0.6259.0%3CBR%20%2F%3ERemote%20Server%3A%20Microsoft%20SQL%20Server%202017%20(RTM-CU15-GDR)%20(KB4505225)%20-%2014.0.3192.2%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E***%20NO%20ISSUE%20-%20SELECT%20WORKS%20NORMALLY%20***%3CBR%20%2F%3ELocal%20Server%3A%20Microsoft%20SQL%20Server%202017%20(RTM-CU15-GDR)%20(KB4505225)%20-%2014.0.3192.2%3CBR%20%2F%3ERemote%20Server%3A%20Microsoft%20SQL%20Server%202014%20(SP3-CU3)%20(KB4491539)%20-%2012.0.6259.0%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E***%20NO%20ISSUE%20-%20SELECT%20WORKS%20NORMALLY%20***%3CBR%20%2F%3ELocal%20Server%3A%20Microsoft%20SQL%20Server%202017%20(RTM-CU15-GDR)%20(KB4505225)%20-%2014.0.3192.2%3CBR%20%2F%3ERemote%20Server%3A%20Microsoft%20SQL%20Server%202017%20(RTM-CU15-GDR)%20(KB4505225)%20-%2014.0.3192.2%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20seems%20that%20the%20bug%20is%20present%20when%20the%20driver%20is%20used%20from%20a%20linked%20server%20on%20a%20SQL%20Server%202014%20instance.%20The%20other%20way%20around%20seems%20fine%20-%20if%20the%20local%20server%20is%20SQL%20Server%202017%20the%20bug%20isn't%20present.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-577233%22%20slang%3D%22en-US%22%3EReleased%3A%20Update%20to%20Microsoft%20OLE%20DB%20Driver%2018%20for%20SQL%20Server%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-577233%22%20slang%3D%22en-US%22%3E%3CDIV%3EMicrosoft%20OLE%20DB%20Driver%2018.2.2%20for%20SQL%20Server%20was%20released%20this%20week%20to%20fix%20an%20issue%20related%20to%20Azure%20Active%20Directory%20authentication.%3C%2FDIV%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CDIV%3E%3CSTRONG%3EFixed%3A%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CUL%3E%3CLI%3EThe%20OLE%20DB%20Driver%2018.2.1%20incorrectly%20tries%20to%20change%20the%20COM%20concurrency%20model%20on%20an%20apartment%20that%20was%20previously%20initialized%20as%20multi-threaded%20(MTA).%20As%20a%20result%2C%20in%20an%20application%20that%20makes%20more%20than%20one%20subsequent%20call%20to%20CoInitialize%20or%20CoInitializeEx%20prior%20to%20calling%20the%20IDBInitialize%3A%3AInitialize%20interface%2C%20the%20driver%20fails%20to%20connect%20when%20using%20any%20of%20the%20Azure%20Active%20Directory%20authentication%20modes.%3C%2FLI%3E%3C%2FUL%3EThe%20updated%20driver%20can%20be%20%3CA%20title%3D%22download%20Microsoft%20OLE%20DB%20Driver%20for%20SQL%20Server%22%20href%3D%22https%3A%2F%2Faka.ms%2Fdownloadmsoledbsql%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Edownloaded%20directly%20from%20Microsoft%3C%2FA%3E.%3CBR%20%2F%3E%3CBR%20%2F%3EDavid%20Engel%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-577233%22%20slang%3D%22en-US%22%3E%3CP%3EOLE%20DB%20Driver%2018.2.2%20for%20SQL%20Server%20was%20released%20this%20week%2C%20fixing%20an%20issue%20related%20to%20Azure%20Active%20Directory%20authentication.%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-577233%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESQLServerDrivers%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Senior Member
Microsoft OLE DB Driver 18.2.2 for SQL Server was released this week to fix an issue related to Azure Active Directory authentication.

 

Fixed:

  • The OLE DB Driver 18.2.1 incorrectly tries to change the COM concurrency model on an apartment that was previously initialized as multi-threaded (MTA). As a result, in an application that makes more than one subsequent call to CoInitialize or CoInitializeEx prior to calling the IDBInitialize::Initialize interface, the driver fails to connect when using any of the Azure Active Directory authentication modes.
The updated driver can be downloaded directly from Microsoft.

David Engel
5 Comments
Occasional Visitor

What's the correct channel for reporting bugs with the MSOLEDBSQL driver? This SQL Server feedback item has been open since Sep 2018 but I'm not sure whether it's got back to the team responsible for that driver.

 

https://feedback.azure.com/forums/908035-sql-server/suggestions/35400568-msoledbsql

 

This issue affects SQL Server linked servers that use this driver - simple SELECTs from a remote table/view using such a linked server fail with "Microsoft Distributed Transaction Coordinator (MS DTC) has stopped this transaction." unless you first begin an explicit distributed transaction. The issue doesn't seem to affect INSERTs/UPDATEs/DELETEs to a remote table or EXECing a remote proc strangely, which work fine without the explicit distributed transaction. The issue is not present in linked servers that use the older SQLNCLI11 or SQLOLEDB drivers. Repro'ed with versions 18.2.1 and 18.2.2 of MSOLEDBSQL.

Senior Member

@jluebbers You would need to contact MS support and they would file an issue. However, a customer just bubbled this up to our attention last week. We are waiting for more information to reproduce the issue. For reference, select * from server.master.sys.databases works fine for me using version 18.2.1 of the driver and SQL Server 2017 CU 17. If you have a linked server creation script and version details which repro the issue, I'd be happy to forward it on to the team.

 

David

Occasional Visitor

@David-Engel  Thanks - there doesn't seem to be a way to attach files here in the comments so I've tried to upload a repro script in the Azure feedback forum I linked above. My comments there are awaiting moderator approval so I'll repeat them here:

 

Repro script attached. We have tested this between a few different versions of SQL Server, all running on Windows Server 2016 (with current updates installed) and MSOLEDBSQL driver 18.2.2.0 installed:

 

*** ISSUE PRESENT - MS DTC ERROR ON SELECT ***
Local Server: Microsoft SQL Server 2014 (SP3-CU3) (KB4491539) - 12.0.6259.0
Remote Server: Microsoft SQL Server 2014 (SP3-CU2) (KB4482960) - 12.0.6214.1

 

*** ISSUE PRESENT - MS DTC ERROR ON SELECT ***

Local Server: Microsoft SQL Server 2014 (SP3-CU3) (KB4491539) - 12.0.6259.0
Remote Server: Microsoft SQL Server 2017 (RTM-CU15-GDR) (KB4505225) - 14.0.3192.2

 

*** NO ISSUE - SELECT WORKS NORMALLY ***
Local Server: Microsoft SQL Server 2017 (RTM-CU15-GDR) (KB4505225) - 14.0.3192.2
Remote Server: Microsoft SQL Server 2014 (SP3-CU3) (KB4491539) - 12.0.6259.0

 

*** NO ISSUE - SELECT WORKS NORMALLY ***
Local Server: Microsoft SQL Server 2017 (RTM-CU15-GDR) (KB4505225) - 14.0.3192.2
Remote Server: Microsoft SQL Server 2017 (RTM-CU15-GDR) (KB4505225) - 14.0.3192.2

 

It seems that the bug is present when the driver is used from a linked server on a SQL Server 2014 instance. The other way around seems fine - if the local server is SQL Server 2017 the bug isn't present.

Occasional Visitor

@David-Engel repro script pasted here, hopefully this doesn't get eaten by the comments form:

 

 

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

USE [master]
GO

EXEC master.dbo.sp_addlinkedserver @server = N'MyLinkedServer', @srvproduct=N'', @provider=N'MSOLEDBSQL', @provstr=N'Server=remoteinstance.mydomain.local;MultiSubnetFailover=Yes;'
GO

EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'MyLinkedServer',@useself=N'True',@locallogin=NULL,@rmtuser=NULL,@rmtpassword=NULL
GO

EXEC master.dbo.sp_serveroption @server=N'MyLinkedServer', @optname=N'collation compatible', @optvalue=N'true'
GO

EXEC master.dbo.sp_serveroption @server=N'MyLinkedServer', @optname=N'data access', @optvalue=N'true'
GO

EXEC master.dbo.sp_serveroption @server=N'MyLinkedServer', @optname=N'dist', @optvalue=N'false'
GO

EXEC master.dbo.sp_serveroption @server=N'MyLinkedServer', @optname=N'pub', @optvalue=N'false'
GO

EXEC master.dbo.sp_serveroption @server=N'MyLinkedServer', @optname=N'rpc', @optvalue=N'true'
GO

EXEC master.dbo.sp_serveroption @server=N'MyLinkedServer', @optname=N'rpc out', @optvalue=N'true'
GO

EXEC master.dbo.sp_serveroption @server=N'MyLinkedServer', @optname=N'sub', @optvalue=N'false'
GO

EXEC master.dbo.sp_serveroption @server=N'MyLinkedServer', @optname=N'connect timeout', @optvalue=N'0'
GO

EXEC master.dbo.sp_serveroption @server=N'MyLinkedServer', @optname=N'collation name', @optvalue=null
GO

EXEC master.dbo.sp_serveroption @server=N'MyLinkedServer', @optname=N'lazy schema validation', @optvalue=N'false'
GO

EXEC master.dbo.sp_serveroption @server=N'MyLinkedServer', @optname=N'query timeout', @optvalue=N'0'
GO

EXEC master.dbo.sp_serveroption @server=N'MyLinkedServer', @optname=N'use remote collation', @optvalue=N'true'
GO

EXEC master.dbo.sp_serveroption @server=N'MyLinkedServer', @optname=N'remote proc transaction promotion', @optvalue=N'true'
GO


/*
this fails with:

Msg 8522, Level 16, State 3, Line 50
Microsoft Distributed Transaction Coordinator (MS DTC) has stopped this transaction.
*/
SELECT TOP 10
*
FROM [MyLinkedServer].[master].[sys].[databases]
GO

 

/*
this succeeds
*/
BEGIN DISTRIBUTED TRANSACTION
SELECT TOP 10
*
FROM [MyLinkedServer].[master].[sys].[databases]
COMMIT TRANSACTION
GO

 

Occasional Visitor

We have tested this between a few different versions of SQL Server, all running on Windows Server 2016 (with current updates installed) and MSOLEDBSQL driver 18.2.2.0 installed:

 

*** ISSUE PRESENT - MS DTC ERROR ON SELECT ***
Local Server: Microsoft SQL Server 2014 (SP3-CU3) (KB4491539) - 12.0.6259.0
Remote Server: Microsoft SQL Server 2014 (SP3-CU2) (KB4482960) - 12.0.6214.1

 

*** ISSUE PRESENT - MS DTC ERROR ON SELECT ***
Local Server: Microsoft SQL Server 2014 (SP3-CU3) (KB4491539) - 12.0.6259.0
Remote Server: Microsoft SQL Server 2017 (RTM-CU15-GDR) (KB4505225) - 14.0.3192.2

 

*** NO ISSUE - SELECT WORKS NORMALLY ***
Local Server: Microsoft SQL Server 2017 (RTM-CU15-GDR) (KB4505225) - 14.0.3192.2
Remote Server: Microsoft SQL Server 2014 (SP3-CU3) (KB4491539) - 12.0.6259.0

 

*** NO ISSUE - SELECT WORKS NORMALLY ***
Local Server: Microsoft SQL Server 2017 (RTM-CU15-GDR) (KB4505225) - 14.0.3192.2
Remote Server: Microsoft SQL Server 2017 (RTM-CU15-GDR) (KB4505225) - 14.0.3192.2

 

It seems that the bug is present when the driver is used from a linked server on a SQL Server 2014 instance. The other way around seems fine - if the local server is SQL Server 2017 the bug isn't present.