Prev Next

ODBC Connection to MariaDB repository

In order for a Enterprise Architect client to open a MariaDB repository using an ODBC connection, the client machine must have the MySQL ODBC driver installed and a ODBC DSN defined for the same architecture (32 or 64 bit) that Enterprise Architect uses.

For example, if you are using the 64bit version of Enterprise Architect, then the client machine will need a 64bit ODBC driver and 64 bit ODBC DSN, but if you are using the 32 bit version of Enterprise Architect then 32 ODBC driver and DSN will be required.

Prerequisites

  • A MariaDB database server
  • A Enterprise Architect repository defined in the MariaDB database server
  • You know the database user credentials that have SELECT, INSERT, UPDATE, DELETE, EXECUTE and SHOW VIEW access permissions to the Enterprise Architect repository
  • You know the architecture (32 or 64bit) of your installed Enterprise Architect application

Install the ODBC Driver

The ODBC driver will only need to be install once on each client machine, therefore if your machine already has the appropriate MySQL ODBC driver installed you can skip to the next step.

Step

Action

1

Download the appropriate MySQL ODBC driver for your operating system and architecture (32 or 64 bit) of Enterprise Architect from the MySQL website.

Note:

  • Not all versions of MySQL ODBC driver function correctly with Enterprise Architect, our experience has determined that versions between 5.2.4 & 5.3.4 and 8.0.16 onwards have been the most stable (see more details in the notes section below).
  • Sparx Systems recommends the MySQL ODBC driver (instead of the MariaDB driver) because it has better performance.

2

Run the MySQL ODBC driver installer, accepting the default values.

Create ODBC DSN

A separate ODBC DSN will need to be created for each MariaDB repository that the client wishes to connect to. 

A ODBC DSN is simply the details of the a database (server and database names, port and user credentials), stored in the registry and given a unique name which allows applications (like Enterprise Architect) to easily connect to databases.

Step

Action

1

The Windows Operating System includes 2 different versions of the ODBC administrative tool, one for 32 bit and the other for 64 bit applications. Therefore you need to open the 'Open Data Source Administrator' that corresponds to the architecture of your Enterprise Architect application.  The easiest way to achieve this is to use Enterprise Architect's build-in ribbon option:  'Settings > User Tools > ODBC Data Sources'.

The ODBC Data Source Administrator window displays.

2

The DSN can be saved as either a User or System DSN, if you have administrator privileges on the local machine then we would suggest saving the DSN  as a System DSN, otherwise your only option is to create a User DSN.

3

Click on the Add button.

The 'Create New Data Source' dialog displays, enabling you to add a new DSN.

4

Select the appropriate MySQL ODBC Driver (usually 'MySQL ODBC x.x Unicode Driver') from the list.

5

Click on the Finish button.

The 'MySQL Connector/ODBC' dialog displays.

6

Enter these configuration details:

  • Data Source Name: (DSN), a unique name for the connection
  • Description: (optional) description of the DSN
  • TCP/IP Server: The host name or IP address of the MariaDB server
  • Port: The port that the MariaDB server is listening to
  • User and Password: database user credentials
  • Database: The database name on the selected server

7

To set the advanced options, click on the Details>> button.

8

Select these checkboxes (where provided):

  • 'Return matched rows instead of affected rows' ('Connection' or 'Cursors/Results' tab)
  • 'Allow big result sets' ('Connection' tab)

9

Click on the Test Connection button to confirm that the details are correct.

10

If the test succeeds, click on the OK button to complete the configuration.

If the test does not succeed, review your settings.

Connect to the Repository

Once the ODBC driver is installed and ODBC DSN defined on a individual machine the Enterprise Architect client can open the repository using the following steps:

Step

Action

1

Open the 'Data Link Properties' dialog using one of the method below:

Keyboard Shortcut:  Ctrl+O : Connect to Server

Start Page | Server Connection (direct to 'Open Server Connection' dialog)

Project list | Open Project : Connect to Server

Start Page : Manage Projects : Connect to Server

2

On the Provider tab select 'Microsoft OLE DB Provider for ODBC Drivers', click  [Next >>]

3

Select the ODBC DSN in the 'Use data source name' combo, click  Test Connection.

4

Once step 3 is successful, click [OK] to open the repository.

If the test does not succeed, review your settings.

Notes

  • Connecting to DBMS based Repositories is available in the Enterprise Architect Corporate, Unified and Ultimate Editions
  • Version 5.3.5 and later of the ODBC driver can be used; however, special care is required to ensure the correct Microsoft Visual Studio redistributable are installed to avoid the database driver causing errors.  For example, versions 5.3.5 to 5.3.14 of the ODBC require an updated version of the Visual Studio redistributable (which has to be manually installed), and in particular the msvcr120.dll file should be at least v12.0.40649.5.

Learn more