Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Prev Next

Create a Project in a PostgreSQL Database

To create a project in a repository on PostgreSQL 7, 8 or 9, you work through these stages:

  • Stage 1: Create an empty database repository  and set up the data tables
  • Stage 2: Set up the PostgreSQL ODBC Driver
  • Stage 3: Perform a project integrity check on the project file you are using as a base (optional, but recommended)
  • Stage 4: Transfer the data
  • Stage 5: Connect to the repository to open the project


  • A machine with PostgreSQL 7.3.2 or higher installed and running
  • psqlODBC, version or higher has been installed (do not use version 8.3.4 or 8.4.1)

Create Database Repository



See also


Create the empty database.

Create a PostgreSQL Repository Registered User's Scripts page Trial User's Scripts Page


Load the EASchema_PostgreSQL_1220.sql file from the Sparx Systems website into your SQL management console of choice (such as pgAdminIII).


Run the script to create the required database schema.

Set Up the ODBC DSN



See also


Create a suitable ODBC Data Source to point to your new database.

Select these extended options:

Page 1:

  Disable Genetic Optimizer - Uncheck

  Use Declare/Fetch - Check

  Unknowns as LongVarChar - Check

  Bools as Char - Uncheck

  Max Varchar - 1024

  Max LongVarChar - 1000000

Page 2:

  bytea as LO - Check

  Disallow Premature - Check

  Protocol - 7.4+

Set up a PostgreSQL ODBC Driver

Perform a Project Integrity Check



See also


In Enterprise Architect, open the file-based project or template from which you are creating the project on the repository.


Select and run the 'Configure > Model > Check Integrity > Project Integrity' ribbon option.

This ensures your project data is 'clean' before being copied to the repository.

Project Integrity Check

Transfer the project data to the repository



See also


Open Enterprise Architect.

(If the 'Open Project' dialog displays, click on the Cancel button to open with no project loaded.)


Select the 'Configure > Model > Transfer > Project Transfer' ribbon option.

The 'Project Transfer' dialog displays.


In the 'Transfer Type' panel, select 'File to DBMS'.


In the 'Source Project' field, click on the button and browse for the name of the project file to copy to the repository.

If the .EAP file has Replication enabled, this must be removed before performing the transfer.

Remove Replication


At the right of the 'Target Project' field, click on the button.

The 'Datalink Properties' dialog displays.


Select 'Microsoft OLE DB Provider for ODBC Drivers' from the list.

Click on the Next button.


On the 'Use Data Source Name' field, click on the drop-down arrow and select the ODBC Data Source you configured to point to your new database.

Click on the OK button. The 'Project Transfer' dialog redisplays.

Set up a PostgreSQL ODBC Driver


If required, select the 'Logfile' checkbox and type a path and filename for the data transfer log file.


Click on the Transfer button to begin the data transfer process.


When the process is complete, you have created a project on a PostgreSQL database and can now connect to it and open it from Enterprise Architect.

Connect to a PostgreSQL Data Repository


  • During the transfer, if an error message displays reporting '...nonstandard use of \\ in a string literal...', set the server variable in the postgresql.conf file to: escape_string_warning = off

Learn more