SQL Scripts PostgreSQL


Before Enterprise Architect can be configured to use PostgreSQL as a Repository the following Software Components need to be installed and configured:
  • MDAC 2.6 or 2.7
  • Install PostgreSQL minimum 7.3.2
  • Install PostgreSQL ODBC driver (Do not use version 8.4.1)

Once these preconditions have been met the following process should be used to create the Enterprise Architect PostgreSQL repository:

  1. Create an empty database.
  2. Using a tool such as the PostgreSQL command line, pgAdminIII or EMS PostgreSQL Manager, load the PostgreSQL_EASchema.sql file, ensuring that the new database is selected as the current database.
  3. Run the script to create all of the required tables /indexs etc.
  4. Create an ODBC Data Source pointing to the new PostgreSQL database.
  5. With the empty database you can now use the data transfer tool to transfer an existing model to the server. Before doing so however, you should run the Project Integrity tool, to ensure the data is 'clean' before uploading. You can do this by opening the existing model in Enterprise Architect and selecting Tools | Data Management | Project Integrity Check.
  6. To proceed with the transfer:
    • Open Enterprise Architect and then select Tools | Data Management | Project Transfer.
    • In the Dialog provided select .EAP to DBMS.
    • For the fields:
      • Source Model: Select the .EAP file that you want to transfer into the PostgreSQL repository.
      • Target Model: Select the PostgreSQL ODBC Data Source in the DBMS connection tool.
    • Enter the name of the .EAP that you want to transfer into the PostgreSQL repository.
    • Select the Microsoft OLE Provider for ODBC Drivers in the Datalink properties dialog, then press the Next button.
    • On the Use data Source name dropdown menu on the connections tab, select the ODBC data source created earlier.
    • Press the OK button. When the dialog appears prompting for the name and connection type, ensure that PostgreSQL is selected. The name is not required.
    • Press the Transfer Data button, this will begin the process.
    • Once this process completes, the contents of the .EAP model now exists on the PostgreSQL repository and you may open the repository from Enterprise Architect, using the "Connect to Server" option.