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 an empty database repository and set up the data tables
  • Stage 2: Set up initial model data

Prerequisites

  • 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 Repository

Step

Action

See also

1.1

Create a new empty database and configure it to your installation's defaults.

Create a SQL Server Repository

1.2

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

1.3

Load the EASchema_1220_SQLServer.sql file from the Sparx Systems website.

1.4

Run EASchema_1220_SQLServer.sql to create the required database schema.

2. Set up Initial Data

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

Setting up this initial data can be achieved in 2 different ways:

  1. Transferring the entire contents of an existing model into the new database, or
  2. Load Initial data using a SQL Script

2.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 specifically for this purpose; the model is copied into the installation folder and is called EABase.eap. 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.

Step

Action

See also

2.1.1

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

2.1.2

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

Check Project Data Integrity

2.1.3

If Enterprise Architect detects that the existing model contains integrity issues then these will be listed, these should be corrected before continuing with the Project Transfer.

2.1.4

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

2.1.5

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

The 'Project Transfer' dialog displays.

2.1.6

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

2.1.7

In the 'Source Project' field, type 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

2.1.8

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

The 'Datalink Properties' dialog displays.

2.1.9

Select 'Microsoft OLE DB Provider for SQL Server' or 'Microsoft OLE DB Driver for SQL Server' from the list.

Click on the Next button.

2.1.10

On the 'Data Source Details' page of the 'Datalink Properties' dialog, type in the server name, database name and any security details required.

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

2.1.11

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

2.1.12

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

2.1.3

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.

Connect to a SQL Server Repository

2.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.

Step

Action

See also

2.2.1

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

2.2.2

Load the EABase_1220_SQLServer.sql file from the Sparx Systems website.

2.2.3

Run EABase_1220_SQLServer.sql  to create the required database schema.

Learn more