RS First Dynamics NAV Blog


...from NAV 3.60 to NAV 2013
Archivio Posts
Anno 2015

Anno 2014

Anno 2013

Anno 2012

Anno 2011

Anno 2010

Anno 2009

Anno 2008

Anno 2007

NAV 2009: configuring more that 1 service with CustomSettings.config file

You are using your pc to run Dynamics NAV 2009 then often you would like to access more than one database without changing the CustomSettings.config file.

In the old classic client it was possible just change the database or the server from the client. But with the Role Tailored client this requires that you're setting up a second service, or basically a different service for each database you want to access.

How to create a second service?

1.     In Control Panel, click Administrative Tools, and then click Services to open the Services snap-in.

2.     Find "Microsoft Dynamics NAV Server" in the list of services and stop it.

3.     Find the Microsoft Dynamics NAV Service directory. If NAV was installed using the default values, then this directory is located at C:\Program Files\Microsoft Dynamics NAV\60\.

4.     Copy the directory and paste it into the same directory. Rename the copy to Service2 (or Service3 etc.).

5.     Go to the command prompt and type the sc command to create a new service. Copy the following command and paste it at the command prompt. Replace with the actual computer name. If your actual directory is different, remember to update this also.
sc \\ create MicrosoftDynamicsNAVServer$NAV2 binpath="C:\Program Files\Microsoft Dynamics NAV\60\Service2\Microsoft.Dynamics.Nav.Server.exe $NAV2" DisplayName="Microsoft Dynamics NAV Server Instance 2" start=auto type=own

6.     If the command succeeds, then you receive the following message:
[SC] CreateService SUCCESS

 Configuring a Second Service

Before you can start to use the second service, you must create a name for the new server instance. He must also activate port sharing so that multiple clients can share the same port number.

To create a name for the server instance

1.     Use Notepad or another text editor and open the CustomSettings.config file in the Service2 directory. The default path for this file is C:\Program Files\Microsoft Dynamics NAV\60\Service2\Custom.Settings.config.

2.     Locate the following line:
   
Change to:
   
Where you replace with the sql name of your database.

3.     Locate the following line:
   
change it to:
   

4.     Locate the following line:
   
change it to
   

5.     Save your changes, and then close the editor.

6.     Restart the services.

NB: It is also possible to use "Net.Tcp Port Sharing Service" (as described by Microsoft in their installation documentation)

 


ESEMPIO UTILIZZO


SCENARIO SERVER LOCALE "NAVSVI"
> INSTALLAZIONE SECONDO SERVIZIO NAV

NAV2


comando
sc create MicrosoftDynamicsNAVServer$NAV2 binPath= "C:\Program Files (x86)\Microsoft Dynamics NAV\60\Service2\Microsoft.Dynamics.Nav.Server.exe $NAV2" DisplayName= "Microsoft Dynamics NAV Server Instance 2" start= auto type= own

 

> INSTALLAZIONE SECONDO SERVIZIO NAV WS

WS2


comando

sc create MicrosoftDynamicsNAVServer$WS2 binPath= "C:\Program Files (x86)\Microsoft Dynamics NAV\60\Service2\Microsoft.Dynamics.Nav.Server.exe $WS2" DisplayName= "Microsoft Dynamics NAV WS Server Instance 2" start= auto type= own

 

ATTENZIONE
> sc crea in locale , in questo caso NAVSVI , utilizzare sc \\SERVER  per installare in remoto)

> attenzione a binPath KeySensitive

> attenziobe allo spazio dopo '='

venerdì, 08 gen 2010 Ore. 16.16

Messaggi collegati


Statistiche
  • Views Home Page: 468.824
  • Views Posts: 885.644
  • Views Gallerie: 0
  • n° Posts: 343
  • n° Commenti: 0
Copyright © 2002-2007 - Blogs 2.0
dotNetHell.it | Home Page Blogs
ASP.NET 2.0 Windows 2003