-
Notifications
You must be signed in to change notification settings - Fork 21
(MODULES-5693) Replace SQLOLEDB with SQLNCLI11 #243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(MODULES-5693) Replace SQLOLEDB with SQLNCLI11 #243
Conversation
This commit replaces the SQLOLEDB provider for connecting to SQL with the SQL Native Client provider, allowing the use of TLS 1.1+ for connections and other advanced features not available through SQLOLEDB. This commit also updates the unit tests for SQL connections.
So far I've tested manually (beaker and vagrant), but not via adhoc. |
IIRC v11 is the latest client version |
Correct, and that's the version we're using here. |
'Initial Catalog' => config[:database] || 'master', | ||
'Application Name' => 'Puppet', | ||
'Data Source' => '.' | ||
'Provider' => 'SQLNCLI11', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My only question here is... is it always the case that this new OLE DB provider is installed across all of the SQL versions by default (with no additional user provided features specified)? Looks like it requires the "SQL Server Native Client" feature... but I'm not totally sure where that lands in the list of features one might install?
I also see that we removed SNAC_SDK
and added a note about Native Client here, but not sure I totally understand the implications:
puppetlabs-sqlserver/lib/puppet/provider/sqlserver_features/mssql.rb
Lines 18 to 22 in 108d109
# resources with the same name. Also due to the SQL Native Client not | |
# being unique across SQL Server versions (e.g. SQL 2016 installs Native Client | |
# with a version that matches for SQL 2012) the features need to be collated | |
# across all versions and then aggregated into a single resource | |
featurelist = [] |
It's also not clear to me just based on the name if SNAC_SDK
actually contains the new OLEDB provider... or if it means it includes all the C++ headers to consume the providers from native code (which is usually what SDK means in this context).
As long as SQL 2012, 2014 and 2016 contain SQLNCLI11
with a minimal install I'm 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is why I'm asking btw:
- https://docs.microsoft.com/en-us/sql/relational-databases/native-client/applications/installing-sql-server-native-client
- https://stackoverflow.com/questions/45161036/the-ole-db-provider-sqlncli11-has-not-been-registered-microsoft-sql-server
(I presume above links are describing how you might get SQLNCLI11
onto an app server that talks to SQL Server, but doesn't have SQL Server installed)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking into this / testing now. I don't know, offhand. Good catch!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm 99% sure native client is ALWAYS installed with the database engine. But SNAC_SDK is different. IIRC native client is part of the setup pre-reqs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As long as the local Vagrant / Beaker test run was against SQL 2012, that should be sufficient to assert that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed that as long as the the SQL Engine is installed, SQL Native Client is too with MSSQL 2012, 2014, and 2016.
This commit replaces the SQLOLEDB provider for connecting to SQL with the
SQL Native Client provider, allowing the use of TLS 1.1+ for connections
and other advanced features not available through SQLOLEDB.
This commit also updates the unit tests for SQL connections.