Freigeben über


Multiple Service Tiers - SP1

Right around the release of Microsoft Dynamics NAV 2009, I wrote a blog entry with some .bat files on how to create multiple Service Tiers when working with NAV 2009.

The blog post is here: https://blogs.msdn.com/freddyk/archive/2008/10/29/multiple-service-tiers.aspx

Now NAV 2009 SP1 is about to be released, it is time for a small update. One of the files of the package is a CustomSettings.template file, which really is just the CustomSettings.config with a few values replaced with variable names, so that we can replace those automagically.

Now in SP1, the CustomSettings.config has changed – new keys have been added and we also support named instances in the database.

SP1 will actually run with the old config file, so we could just ignore the entire thing and continue as if nothing happened – the .bat files will still work in SP1.

However – if we want to take advantage of the named instances in SQL Server or we want to have the additional keys available for modifying we need to change something.

I have created a new CustomSettings.template based on the SP1 config file - copy the config file and change the following keys:

    <add key="DatabaseServer" value="#DBSERVER#"></add>
<add key="DatabaseInstance" value="#DBINSTANCE#"></add>
<add key="DatabaseName" value="#DATABASE#"></add>
<add key="ServerInstance" value="#INSTANCE#"></add>

and extended the createservice.bat file to also allow a database instance to be specified, meaning that the usage is now:

CreateService name [dbserver] ["dbinstance"] ["dbname"] [demand|auto|disabled] [both|servicetier|ws]

The new .zip file is available for download here.

Enjoy

Freddy Kristiansen
PM Architect
Microsoft Dynamics NAV

Comments

  • Anonymous
    July 29, 2010
    Don't know if there's maybe an official document about this, but for all of you who are using the DatabaseInstance value: Please note that if the values vor DatabaseInstance & ServerInstance are the same, you will get an error like "The Microsoft Dynamics NAV Server cannot connect the Change Listener to SQL Server because of the following error: 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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)"

  • Anonymous
    September 03, 2010
    For a site of 100 users, we installed two Dynamic NAV Server Services on the same computer as the middle tier.  Both of them are pointing to the same SQL server & DB.   However, we could not get the second service to start.   It says that some services stop automatically if they have no work to do....  Does it make sense?

  • Anonymous
    July 11, 2011
    your problem is for the number port of web service, it would be diferent from the other services, if you use in one service the port 7046 you have to change this port number for the new instance of service.