This section describes all steps required to run a service that connects to databases:

  • Installing SQL client tools
  • Defining the SQL adapter preferences
  • Defining database parameters

When installing the BRIDGE, all additional libraries (SQL Libraries, SAP Libraries, and Java Libraries) are being installed as well.
After a successful installation, the BRIDGE is capable to connect to database backends.

First, you need to install the client tools or the ODBC drivers and configure each database access if needed.
Databases like DB2 or Oracle are usually running on a dedicated database server. The BRIDGE opens a connection to the database server via the database client tools or ODBC.

Prerequisites

The BRIDGE has been successfully installed. When running the BRIDGE in server mode (as opposed to workstation mode), the BRIDGE node instance has to be a member of a BRIDGE domain. For more information on installation modes and BRIDGE domains, refer to Installation Modes and Bridge Domain.

Supported Databases

DatabaseVersions
DB2DB2 CLI version 6.x or higher
InformixInformix CLI version 2.x or higher
InterBase
 InterBase client API version 5.x or higher, all Firebird versions
Microsoft SQL Server

ODBC: SQLServer ODBC version 2000.x or SQL Server Native Client (ODBC API) version 2005 and higher

OLE DB: SQL Server OLE DB version 2.5 or higher

MySQLMySQL C API version 3.23.x or higher
OracleOracle OCI version 8 or higher
PostgreSQLlibpq version 7.1.x or higher
SQLBaseCAPI version 6.x or higher
SQLitelibsqlite version 3.x or higher

Sybase

Open Client version 10.0 or higher

Installing Database Access

If you want to access the installed database via the xUML RUNTIME that is embedded in Scheer PAS BUILDER, please note that you have to make the database client available to the BUILDER:

  • Install a database client to the system you are running the BUILDER on.
  • Make sure that the database client location makes part of the PATH variable.
    After having changed PATH, you need to restart MagicDraw to make it read the new content of PATH.

Defining the ODBC Database Parameters

All well-known databases like Oracle, DB2, Inter Base, Firebird, dBase, Access, FoxPro, Paradox, SQL Server, and so on can be connected via ODBC.
Install the required ODBC drivers and define the parameters for each connection.

Before starting a deployed xUML service that connects to a database backend, you may want to redefine required database parameters in the BRIDGE.
You find more information about database-specific information (database names and mappings) in section Database-Specific Mappings.

Select the xUML service in the navigation (in this example CustomerQuery and stop the service.

Switch to tab Settings. From the dropdown list, select the option SQL Adapter Connection in the Add-ons category.

The default parameters are defined in the component diagram of the xUML service (see CustomerQuery example below). The connection is defined by a dependency between the composite named CustomerQuery and the SQL alias customers. The database user and password are defined in the tagged value user on the SQL alias.

Enter the following database parameters and click Apply:

KeyValue
customers: DBTypeName of the SQL Service component e.g. ODBC
customers: DBNameName of the database, e.g. NorthwindCustomers
customers:Connection Pooling
customers:Max Connection Reuse

customers: Max Connection Age
 
customers: Max Connection Idle Time
 

For each SQL adapter alias found in the activity diagrams of a UML model, you will find a pair of the two parameters DBType and DBName on the SQL adapter connection settings. According to the example with the both parameters in the table above, you would find an alias called customers in the UML model of the deployed xUML service CustomerQuery.

Now, select SQL Adapter Authorization from the list.

Enter the following database parameters and click Apply:

KeyValue
customers: DBUserDatabase user
customers: DBPasswordDatabase password

Users who do not have the permission to view the settings cannot see the Settings tab at all. This prevents that unauthorized users access sensitive information like passwords, etc. 

For more details on changing the settings refer to xUML Service Settings.