Export (0) Print
Expand All

How to: Manually Install the SQL Server Modeling Services Database and Common Domains

[This content is no longer valid. For the latest information on "M", "Quadrant", SQL Server Modeling Services, and the Repository, see the Model Citizen blog.]

This topic describes how to create a new SQL Server Modeling Services database and then load that database with the system-provided models.

When you install the SQL Server Modeling CTP, the setup routines automatically create a default Modeling Services database named Repository. If you need to recreate that default Modeling Services database, one strategy is to reinstall the SQL Server Modeling CTP.

There are situations where you must manually install the Modeling Services database and the necessary models in the database. For example, creating multiple Modeling Services databases with distinct names, such as RepositoryTest and RepositoryDevelopment, requires manually creating the databases. Also, there are many advanced options that you can use from the command-line to customize the features of the installed Modeling Services database. This topic discusses the requirements and available options for installing the Modeling Services database from a command prompt.

Creating a Modeling Services Database

Modeling Services installs to any SQL Server 2008 database. However, the Mx.exe tool provides a convenient way to create a new Modeling Services database. The initial database contains the “M” language catalog that is used to support the features of “M” models in the database. However, it does not yet contain the Base Domain Library (BDL) or any of the common domains, such as System_Runtime.

The following procedure shows how to create the database by using Mx.exe. For a full list of database creation options, see the create section of the Mx.exe Command Line Reference.

To create a Modeling Services database

  1. On the Start Menu, select Microsoft SQL Server Modeling CTP, and then click Microsoft SQL Server Modeling CTP Command Prompt.

  2. At the command prompt, use Mx.exe to create a new Modeling Services database. Specify the name of the database with the database option.

    mx.exe create /database:Repository
    
    Ee820022.Important(en-us,VS.85).gif Note:
    The command above will fail if the target database exists. In this example, if the Repository database already existed and you wanted to recreate it, you could add the force option to the command-line to accomplish this. The force option will drop the target database and recreate it, and you will lose any data that you have in the existing database.

Adding the Base Domain Library

The BDL models support the features of Modeling Services. For more information about the BDL, see Base Domain Library (BDL). The BDL is contained in an image file, Repository.mx, which you can install into a new Modeling Services database. There are also properties that are associated with the BDL that can be applied with the property option during the installation. Tthe Repository.mx file has the following available properties:

  • RepositoryAdminGroupMembers or ram – specifies a comma-separated list of domain accounts to assign to the RepositoryAdministrator role in the database.

  • RepositoryChangeTracking or rct – specifies either the plus sign (+) to enable change tracking or the minus sign (-) to disable change tracking.

  • RepositoryAuditing or ra – specifies either the plus sign (+) to enable auditing or the minus sign (-) to disable auditing.

  • RepositoryChangeDataFileGroup or rcdfg – specifies either the plus sign (+) to create a new file group for CDC data or the minus sign (-) to decline.

  • RepositoryChangeDataPartitionFile or rpf – specifies either the plus sign (+) to create a partition file for CDC data or the minus sign (-) to decline.

  • SchemaPolicy or sp – specifies either the plus sign (+) to enable the schema policy that enforces Modeling Services schema rules or the minus sign (-) to decline.

  • FullRecovery or fr – specifies either the plus sign (+) to enable full recovery or the minus sign (-) to disable it.

The following example installs the BDL into a database named Repository. This database has just been created with Mx.exe and contains only the “M” language catalog. In this example, auditing is enabled with the RepositoryAuditing property.

To install the Base Domain Library

  1. On the Start Menu, select Microsoft SQL Server Modeling CTP, and then click Microsoft SQL Server Modeling CTP Command Prompt.

  2. Use the Mx.exe tool to install the Repository.mx image file. Use the property option to customize the installation.

    mx.exe install Repository.mx /database:Repository /property:ra=+
    
    Ee820022.Warning(en-us,VS.85).gif Caution:
    If the installation of the BDL fails, the Modeling Services database can be left in an intermediate state. In this state, future installations of the BDL and common domain models can fail. The only solution is to drop and recreate the Modeling Services database.

Adding the Common Domain Models

Modeling Services also provides common domains that have a variety of benefits. For more information, see SQL Server Modeling CTP Domains Overview. Each domain has an associated image file (.mx). The following procedure installs the common domains to a Modeling Services database named Repository. This example assumes that these domains have not yet been loaded into the database.

To install the common domains

  1. On the Start Menu, select Microsoft SQL Server Modeling CTP, and then click Microsoft SQL Server Modeling CTP Command Prompt.

  2. Install the System_Runtime domain by using the System.Runtime.mx file.

    mx.exe install System.Runtime.mx /database:Repository
    
  3. Install the Microsoft.Uml2 domain by using the Microsoft.Uml2.mx file.

    mx.exe install Microsoft.Uml2.mx /database:Repository
    
  4. Install the System.Identity domain by using the System.Identity.mx file.

    mx.exe install System.Identity.mx /database:Repository
    
    Ee820022.Warning(en-us,VS.85).gif Caution:
    If the installation fails for any common domain models, the Modeling Services database can be left in an intermediate state. In this state, future installations of the same models or dependent models can fail. The only solution is to drop and recreate the Modeling Services database.

See Also


Community Additions

Show:
© 2014 Microsoft