Author Topic: [SOLVED] Unable to connect via OLEDB to SQLServer from EA  (Read 46143 times)

Mauricio Moya (Arquesoft)

  • EA User
  • **
  • Posts: 341
  • Karma: +8/-4
  • EA Consulting and development in Spanish
    • View Profile
    • Arquehub Azure Module
[SOLVED] Unable to connect via OLEDB to SQLServer from EA
« on: February 05, 2020, 10:55:10 pm »
Hi. I have the following scenario using the Google Cloud Platform in order to set a DB-based model in EA:
-Database: SQLServer 2017 standard (a SQL instance in GCP)
-EA Server: Windows server 2019 64 bits.

The idea is to install in the EA server the Pro Cloud Server and the Keystore service.

I even (just for testing) installed EA 15.1 in the EA Server in order to test the connection.

After installed the database, I can connect from my PC to the database by using the SQLServer Management Studio. Then I run the EA tables script, and everything seems to be right.

BUT, when trying to connect to the database by using EA, or the Pro Cloud Server, I always get this error:
Code: [Select]
[DBNETLIB][ConnectionOpen (SECDoClientHandshake()).]SSL Security error.
And If I try to connect from the EA in my local PC to the database, the error shown is:
Code: [Select]
Unspecified error
I'm not sure but it seems to be some incompatibility between the SQLServer version and the window libraries? is that possible? I have never seen such thing in years using EA and a SQLServer database. Any ideas?
« Last Edit: February 07, 2020, 12:06:16 am by Arquesoft »

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1145
  • Karma: +30/-8
    • View Profile
Re: Unable to connect via OLEDB to SQLServer from EA
« Reply #1 on: February 06, 2020, 01:19:21 am »
What version of Sparx EA and SQL Server are you using? What type of security are you using for the ODBC Data Source Sparx EA needs to connect to SQL Server?

Are you sure this is not a firewall or security problem?

The SSL error in your message indicate that you could be experiencing a firewall or security problem.

Mauricio Moya (Arquesoft)

  • EA User
  • **
  • Posts: 341
  • Karma: +8/-4
  • EA Consulting and development in Spanish
    • View Profile
    • Arquehub Azure Module
Re: Unable to connect via OLEDB to SQLServer from EA
« Reply #2 on: February 06, 2020, 05:19:48 am »
What version of Sparx EA and SQL Server are you using? What type of security are you using for the ODBC Data Source Sparx EA needs to connect to SQL Server?

Are you sure this is not a firewall or security problem?

The SSL error in your message indicate that you could be experiencing a firewall or security problem.

EA 15.1, SQLServer 2017 Standard. It is a OLEDB connection. It is supposed you don't use ODBC for SQLserver databases in EA. I'm sure it is not a firewall issue because I can connect remote using SQLServer Management Studio.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: Unable to connect via OLEDB to SQLServer from EA
« Reply #3 on: February 06, 2020, 09:35:53 am »
The problem is that your SQL Server instance has been set to require TLS 1.2. The default OLEDB driver for SQL Server provided with windows doesn't support this. Instead, you need to download an updated version from Microsoft with a slightly different name.

Mauricio Moya (Arquesoft)

  • EA User
  • **
  • Posts: 341
  • Karma: +8/-4
  • EA Consulting and development in Spanish
    • View Profile
    • Arquehub Azure Module
[SOLVED] Re: Unable to connect via OLEDB to SQLServer from EA
« Reply #4 on: February 07, 2020, 12:06:00 am »
Solved thanks to Sparx support: For the scenario described above, you have to install the following SQLServer driver (in the machine trying to connect the database): https://www.microsoft.com/en-us/download/details.aspx?id=56730

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: [SOLVED] Re: Unable to connect via OLEDB to SQLServer from EA
« Reply #5 on: February 07, 2020, 12:12:56 am »
Solved thanks to Sparx support: For the scenario described above, you have to install the following SQLServer driver (in the machine trying to connect the database): https://www.microsoft.com/en-us/download/details.aspx?id=56730
For later reference (in case the link goes stale) this downloads Microsoft® OLE DB Driver 18 for SQL Server®

Geert

mkx

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: [SOLVED] Unable to connect via OLEDB to SQLServer from EA
« Reply #6 on: August 17, 2022, 11:03:30 pm »
I have similar problem and even with the driver update the connection doesn’t work. However, there is a different error I get now “Invalid Data Source… Check configuration”. Repository DB looks fine though as I can connect to it from my PC. More details:
•   EA 12.1 installed on Windows Server 2012 VM
•   Repository DB has been migrated from SQL 2012 to SQL 2019
•   There are no network restrictions between the server and the DB.
•   The DB seemed to be migrated correctly. I can connect to it from my PC (using same version of EA). The repository looks just fine.
•   Initially I got SSL Security Error when connecting from Windows Server 2012 so I reinstalled DB drivers to the one referred in this topic.
•   When using a connection wizard everything goes fine now. I enter DB , user and pass. Connection test is successful. But, when I finish the config I get “Invalid Data Source… Check configuration” and the connection is neither established nor added to the project list. Often EA crashes in the end.
•   As said , the DB with my repository can be accessed and managed from EA installed on my PC. It’s the connection from the server which doesn’t work.

Do you have any suggestions?

Mauricio Moya (Arquesoft)

  • EA User
  • **
  • Posts: 341
  • Karma: +8/-4
  • EA Consulting and development in Spanish
    • View Profile
    • Arquehub Azure Module
Re: [SOLVED] Unable to connect via OLEDB to SQLServer from EA
« Reply #7 on: August 18, 2022, 12:41:44 am »
You have now two options:

1. As Geert said: downloads Microsoft® OLE DB Driver 18 for SQL Server®
2. Use EA v16 that uses native SQL connections

mkx

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: [SOLVED] Unable to connect via OLEDB to SQLServer from EA
« Reply #8 on: August 19, 2022, 05:12:42 am »
Thanks for the comment. The driver has already been installed. After I did that i stopped getting the SSL error. But I am getting the 'invalid data source instead'. As said, everything does work when i connect to the same repository using the same EA version from a PC.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: [SOLVED] Unable to connect via OLEDB to SQLServer from EA
« Reply #9 on: August 19, 2022, 08:19:43 am »
•   EA 12.1 installed on Windows Server 2012 VM

Quote
Release Notes for 14.0 Build 1423
*********************************

Direct SQL Server connections now available using Microsoft OLE DB Driver for SQL Server:
    . This updated driver from Microsoft supports multi-subnet failover capabilities and TLS 1.2 connections between client and server

Which means you have 4 options.
  • Upgrade to EA 14 and then download and use Microsoft® OLE DB Driver 18 for SQL Server®
  • Upgrade to EA 16 and then use the native SQL Server connection method
  • (Possibly) Configure SQL Server 2019 to accept TLS 1.1 connections
  • Downgrade SQL Server to a version that allows you to not require TLS 1.2 connections