Book a Demo

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 SQL Server Database

To create a project on a repository in SQL Server 2005 and above, or SQL Server Express 2005 and above, work through these stages:

  • Stage 1: Create a database and tables
  • Stage 2: Set up a connection to the database
  • Stage 3: Set up initial model data


  • A machine with SQL Server installed and running
  • MDAC 2.6 or higher on the client machine
  • Permissions to create databases on SQL Server (see the SQL Server Security Permissions Help topic)
  • ALTER permission on the t_image table in Enterprise Architect, to be able to import model images

1. Create a SQL Server database and tables



See also


Create a new empty database and configure it to your preferences, making sure to configure the correct character set and collation. The exact method you use to create the database is not important to this discussion, therefore use the most convenient or familiar method.

As an example Microsoft's SQL Server Management Studio could be used:

  • In SQL Server Management Studio, locate the server on which to create your new database (such as DBSERVER02\SQLEXPRESS) and login with administrator privileges.
  • On the Databases folder, right-click and choose the 'New Database' option.
  • Enter a suitable name for the database and set any options as required, including the character set and collation.
  • Click OK to create the database


If not already open your SQL management console of choice (such as Microsoft SQL Server Management Studio) and connect to the new database.


Download the EASchema_1558_SQLServer.sql file from the Sparx Systems website and open it in the SQL management console.


Run EASchema_1558_SQLServer.sql to create the required database schema.


If your Enterprise Architect user base are all using v14 or greater then we would suggest applying the optional schema update that removes the need for users to have an elevated level of permissions in the database when importing images.  To achieve this:

Download the  EASchema_1558_SQLServer_Update1.sql file from the Sparx Systems website and open it in the SQL management console and run it.

2. Set up Connection to the SQL Server repository

From Enterprise Architect version 16 there are now two different ways that Enterprise Architect can connect to SQL Server repositories:

Note: Sparx Systems recommend Native connections as they are much simpler and don't require any other software installed or configured.

3. Set up Initial Data

Enterprise Architect repositories require a basic amount of reference data to function correctly.

You can set up this initial data in one of two different ways:

  • Transfer the entire contents of an existing model into the new database, or
  • Load initial data using a SQL Script

3.1 Load Initial Data - Transfer existing model

If you choose to set up your new database with the contents of an existing model then Sparx Systems recommend that a Project Integrity check is performed on the existing model to ensure it is 'clean' and free from data-related errors before being copied into the new database.

The Enterprise Architect installation provides a model called EABase.qea, which is copied into the installation folder specifically for the purpose of providing basic data for a new model. However, if you have customized the various drop-down lists in another model then you might prefer to use that. Regardless of what model you choose to use, the process is the same and is outlined here.



See also


In Enterprise Architect, open the existing repository and select 'Settings > Model > Integrity > Project Integrity' in the ribbon.


Ensure that the 'Action' panel is set to 'Report Only' and that all items in 'Checks to Run' are enabled, then click on the Go button.

Check Data Integrity


If Enterprise Architect detects that the existing model contains integrity issues, they will be listed in the main panel at the bottom of the dialog. These issues should be resolved before continuing with the project transfer.


With Enterprise Architect open, ensure that there is no project loaded, by selecting 'Close Project' from the  Project list button.


Select the 'Settings > Model > Transfer > Full Project Transfer via Connection' ribbon option.

The 'Project Transfer' dialog displays.


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


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

If the .QEA 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 and select either:


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 SQL Server database and can now connect to it and open it from Enterprise Architect.

3.2 Load Initial Data - SQL Script

The Sparx Systems website provides a SQL Script that contains a series of INSERT statements that will load an empty database with all the data needed by Enterprise Architect.



See also


Open your SQL management console of choice (such as Microsoft SQL Server Management Studio), and connect to the new database.


Download the EABase_1558_SQLServer.sql file from the Sparx Systems website and open it in your SQL management console.


Run EABase_1558_SQLServer.sql  to load the required initial data.

Learn more