Setting up the SQL Server directory

To use SQL Server directory implementation, you need SQL Server at least 2008 Standard Edition.

First, you need to create a new database. Then, generate the DDL script by using flwsqlgen tool in the installation package. In the Bin directory of the installation package, run from the command line:

flwsqlgen v0.1 /o output.sql /adm domain\username

The DDL script will be written to the file specified in the /o argument (otherwise, the script will go to stdout). The user specified in /adm argument will be granted the Administrator role.

The first argument of the tool is the DB version to generate. Currently only 'v0.1' is supported.

Make sure the database is working in MVCC mode i.e. READ_COMMITTED_SNAPSHOT option should be ON.

The connection must support multiple result sets, so make sure the following option is set in the connection string:


To install the SQL Server directory, build the SqlServerDirectory target in the installation project (the directory host will be installed as a dependency).

Finally, edit Flower.Services.Host.Services.config to set the SQL Server directory implementation as the directory service. Find the object called 'service' and edit its 'Directory' property.

<object id="service" type="Flower.Services.Host.Service, Flower.Services.Host">

  <!-- The directory. -->
  <property name="Directory">
    <object factory-object="directoryProxyProvider" factory-method="MakeProxy">
        <object type="Flower.SqlServer.Directory.Directory, Flower.SqlServer.Directory">
          <constructor-arg name="settings">
            <object type="Flower.SqlServer.Directory.Settings, Flower.SqlServer.Directory">
              <!-- The name of the connection string to use to connect to a SQL server instance. -->
              <property name="ConnectionStringName" value="FlowerDirectory" />
          <constructor-arg name="authorizationProvider" ref="authorizationProvider" />
          <constructor-arg name="scriptEnginePool" ref="scriptEnginePool" />
          <constructor-arg name="directoryProxyProvider" ref="directoryProxyProvider" />
          <constructor-arg name="processesDispatcher" ref="processesDispatcher" />

Make sure your directory object is created by the directory proxy provider.

Last edited Aug 13, 2013 at 1:48 PM by dbratus, version 2


No comments yet.