Issue when using the model generator when not running a local database

The model generator is a useful tool to import your existing data in BHOLD Core. You can use csv or excel-files in a certain format.

I’ve been using the model generator to import data in the Five-file set (as described in the link above). This is the environment I’m using:

As you can see, the BHOLD Suite modules are not installed on the same server as the server where SQL Server is installed. This shouldn’t be a problem. When installing the Model Generator, everything worked fine, but once running it, I came across this error:


This shows up in the event log:

System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server)

What happens here is that the model generator tried to export the contents of the text-files to the BHOLD database. According to the error, the SQL Server is unavailable. It turns out that the Model Generator is trying to access the database on the local server. This is caused by an error in the installation file.

To fix this, open the registry editor (‘regedit’) and navigate to: ‘HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\bhold\ModelGenerator’. The first thing you’ll notice is that you are not permitted to access this key.
To solve this, open the regedit mmc using the service account you used during the model generator setup. You can do the modifications from there or change permissions so that your account gets the right permissions.

Once you gained access to the ‘ModelGenerator’-key, you’ll see two important values: ‘BackupSQLServer’ and ‘SQLServer’. You’ll notice that the model generator installer did not use the sql server hostname you provided but has instead used the local machine name. Change both values to make model generator work.

As always, if you need any help in getting the model generator to work, please let me know. It took me a while to get this tool working, but it’s quite useful once you figure out how to make it work :)!

This entry was posted in Uncategorized and tagged . Bookmark the permalink.

14 Responses to Issue when using the model generator when not running a local database

  1. Chris says:


    I keep getting an error when importing the OU File, I have is named “OUs” as the documents state, all the row headings are correct as far as I can see. The error is:

    ‘OUs$’ is not a valid name. Make sure that it does not include invalid characters or punctuation and that it is not too long.

    Any ideas?



    • pdeloos says:


      Is there anyway for you to send me (part of) the files you used? It will be easier for me to find out what’s going wrong if I can import them into my sandbox-environment.

      Best regards,

      • Omar El Leissy says:

        According to technet documentation, the role file should be named “Role” and after I did that I got the same error but instead of ‘OUs$’, I got ‘Role$’. So I renamed it to “Roles” and it worked.


  2. shakti. says:

    HI ,
    Would you illustrate a common example referring to BHOLD model generator 3-file set.

    • pdeloos says:

      The difference is that, using the three file set, you don’t import any roles and permissions. BHOLD will create a role for each user and one for each OU. After that, you can create roles in BHOLD manually if you like.

  3. shakti says:

    Can we only import the OU structure into BHOLD core without using the users and Account permissions file in 3-file SET format for BHOLD model generator?

    • pdeloos says:

      Yes you can, but know that all the import files should contain at least one record. To import only the OU structure, you should create a ‘dummy’ row. After the import, you can delete the created dummy-user and account permission.

  4. shakti says:

    One more query, Is it possible to update the OU lists by using model generator ?

  5. shakti says:

    I am creating BHOLD attestation campaign .I have followed all instructions in the technet link.
    But i am getting an error on saving “error while saving the campaign”.Any suggestions.
    Using Single Occurence attestation campaign,with model based as defined stewards.
    And i havenot created any notifications

  6. shakti says:

    Getting error “the was an error while saving the campaign” while creating an attestation campaign in BHOLD.
    Tried everything but still getting the error.

    • pdeloos says:

      Is it possible to provide me with a little more details? Some screenshots of the input values might help. Can you email me these? (

  7. shakti says:

    Want to create child Ou’s in BHOLD .For ex- root|abc and inside abc another OU called xyz.
    Could you elaborate how to achieve this. tried different methods including using CSV and SQL table. and followed technet for the flows.but couldn’t do so.
    Any clue on this ?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s