Prev | Next |
ODBC Connection to PostgreSQL repository
In order for an Enterprise Architect client to open a PostgreSQL repository using an ODBC connection, the client machine must have the PostgreSQL ODBC driver installed and an ODBC DSN defined for the same architecture (32 or 64 bit) that Enterprise Architect uses.
For example, if you are using the 64 bit version of Enterprise Architect, then the client machine will need a 64 bit ODBC driver and 64 bit ODBC DSN, but if you are using the 32 bit version of Enterprise Architect then a 32 ODBC driver and DSN will be required.
Prerequisites
- A PostgreSQL database server
- An Enterprise Architect repository defined in the PostgreSQL
- You know the database user credentials that have SELECT, INSERT, UPDATE, DELETE, EXECUTE access permissions to the Enterprise Architect repository
- You know the architecture (32 or 64 bit) of your installed Enterprise Architect application
Install the ODBC Driver
Step |
Action |
---|---|
1 |
Download the appropriate PostgreSQL ODBC driver (psqlODBC) for your operating system and architecture (32 or 64 bit) of Enterprise Architect from the PostgreSQL website. Note:
|
2 |
Run the PostgreSQL driver installer, accepting the default values. |
Create ODBC DSN
A separate ODBC DSN must be created for each PostgreSQL repository that the client wants 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 that 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 . The 'Create New Data Source' dialog displays, enabling you to add a new DSN. |
4 |
Select 'PostgreSQL UNICODE' from the list. |
5 |
Click on the . The 'Postgre SQL Connector/ODBC' dialog displays. |
6 |
Enter these configuration details:
|
7 |
To set the advanced options, click on the and set the options on 'Page 1' as shown: Note: From version 9.5.4 onwards some options shown in this image are no longer available and can be ignored. |
8 |
If you are using a version of PostgreSQL between 8 and 9.5.4, set the options on Page 2 as shown:
Note: From version 9.5.4 onwards the two options are no longer available and can be ignored. |
9 |
Click on the to close the Advanced Options screen. |
10 |
Click Test and if successful, click on the 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 an individual machine, the Enterprise Architect client can open the repository using these steps:
Step |
Action |
---|---|
1 |
Open the 'Data Link Properties' dialog using one of these methods:
|
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