LoadUml.exe Command Line Reference

[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.]

The LoadUml.exe tool imports XMI documents of UML models into a SQL Server Modeling Services database. Industry tools that work with UML often provide support for exporting UML models as XMI documents. For more information about the XMI specification, see Object Management Group’s XML Metadata Interchange (XMI) version 2.1. To load an XMI document into a Modeling Services database, the structure of the XMI document must conform to version XMI 2.1, and the UML content serialized in this XMI file must conform to UML 2.1.1.

The UML models load into the Microsoft.Uml2 schema. Alternatively, LoadUml.exe can also create a Microsoft code name “M” code file that contains the Microsoft.Uml2 instance data. You can then compile this “M” source file and install it into a Modeling Services database. For more information about the Microsoft.Uml2 schema, see Microsoft.Uml2.

There are several requirements when using LoadUml.exe. First, provide the name of the .xmi file to load into the Modeling Services database. You must also use the targetFolder option to provide a Modeling Services Folder to associate with the loaded metadata. For more information about  Folders, see Using Folders and Ids. If the target specifies M, then you also must provide an output “M” source file location by using the mFile option.

The following example loads an .xmi file named Sample.xmi into the Modeling Services database on the local machine, specifying a SampleFolder subfolder under the system-provided Repository Folder.

LoadUml.exe c:\temp\Sample.xmi /targetFolder:Repository/SampleFolder /target:Repository

Command Line Usage

Run LoadUml.exe from a Microsoft SQL Server Modeling CTP Command Prompt. The following table lists the available command-line parameters for LoadUml.exe.

Option Alias Description

targetFolder:

tf

A SQL Server Modeling Services Folder path delimited with forward slashes. The Folder is created if it does not already exist.

baseUri:

b

Specifies the base URI of the XMI documents to load. (Default = https://tempuri.org)

target:

tgt

Specifies the target location for the output. Possible values include Repository for the Modeling Services database or M for an “M” source file. (Default = Repository)

mFile:

mf

Specifies the “M” output file name. This is used when target is set to M.

force

f

Overwrites the M output file if it already exists.

recurse

r

Enables recursion on input directories.

database:

d

Specifies the target Modeling Services database. (Default = Repository)

server:

s

Specifies the target server. (Default = (local)).

userInstance

ui

Redirects the connection from the default SQL Server instance to a runtime-initiated instance running under the account of the caller (applies only to SQL Server Express).

trustedConnection:

t

Specifies the security setting for the connection. Possible values include None, Integrated, and SSPI. (Default = Integrated)

user:

u

Specifies the user name for the connection. This is required if the trustedConnection option specifies a value of None.

password:

p

Specifies the password for the connection. This is required if the trustedConnection option specifies a value of None.

loginTimeout:

lt

Specifies the timeout value in seconds for the login when connecting to the server. (Default = 15)

commandTimeout:

ct

Specifies the timeout value in seconds for running SQL commands. (Default = 30)

nologo

nologo

Suppresses the tool logo text.

?

h, help

Displays the command-line help text.

@<file>

Reads the specified <file> for more parameters.

Remarks

You must specify a valid database connection even when you output an “M” source file. The loader checks the database to see if the target Folder that is specified by the targetFolder option already exists.

If targetFolder specifies a Folder that does not exist, the loader creates the Folder. The caller must have permission to create the target Folder. Any new subfolders must be direct descendents of an existing parent Folder. For more information about  Folders, see Using Folders and Ids.

Warning

Large XMI documents can take a long time to load. It is possible to generate an out-of-memory error for large XMI documents.

See Also

Concepts

Microsoft.Uml2