Thursday, October 2, 2014

Create RTC Service using Powershell and cmd

Hi,

Steps to create RTC service for NAV 2013/ NAV 2013 R2/ NAV 2015
It is very helpful to create different Navision instances for different Build versions:

  • Open power shell by run as administrator and run following command
New-Service -Name 'MicrosoftDynamicsNAVServer$DynamicsNAV71B37221' -BinaryPathName '"C:\Program Files\Microsoft Dynamics NAV\71\ServiceB37221\Microsoft.Dynamics.Nav.Server.exe" $DynamicsNAV71B37221 /config "C:\Program Files\Microsoft Dynamics NAV\71\ServiceB37221\Microsoft.Dynamics.NAV.Server.exe.config"' -DependsOn 'NetTcpPortSharing' -Description 'Service handling DynamicsNAV71B37221' -DisplayName 'Microsoft Dynamics NAV 71 Server[Rollup 9]' -StartupType Manual


























  • Start the following standard portsharing service to use port sharing (if it is not started)
Net.Tcp Port Sharing Service









  • Enable port sharing for new service by using following command in cmd (run as administrator)
sc.exe config MicrosoftDynamicsNAVServer$DynamicsNAV71B37221 depend= HTTP/NetTcpPortSharing


















  • Change the login user in service and set the proper service user



















  • Check the custom setting file and check the database name, server name,service instance name,etc than after start the service
  • Check the event log if any problem in service starting

Tips: to identify the client and server exe by name

1) Client exe always exists in: “Program Files (x86)” folder with name
    C:\Program Files (x86)\Microsoft Dynamics NAV\70\RoleTailored Client\Microsoft.Dynamics.Nav.Client.exe

2) Server exe always exists in: “Program Files” folder with name
    C:\Program Files\Microsoft Dynamics NAV\70\Service\Microsoft.Dynamics.Nav.Server.exe

Client folder is use for – open development environment and RTC Client
Service folder is use for – create the service for that version with build


Tips: Start the port sharing of any service using following command

Start the cmd by run as administrator  
sc.exe config MicrosoftDynamicsNavServer$DynamicsNAV71_B37534 depend= HTTP/NetTcpPortSharing


Tips: Delete the service using command prompt

Start the cmd by run as administrator
Run the following command
sc delete "NILESHGAJJAR-CLASSIC"


--------------------------------------------------------------------------------------------------------------------------


Steps to create RTC service for NAV 2009 / NAV 2009 SP1 / NAV 2009 R2

  • Run cmd by administrator and run the following command
SC CREATE "MicrosoftDynamicsNavServer$Svr3" binpath= "C:\Program Files (x86)\Microsoft Dynamics NAV\60\ServiceNAV2009R2\Microsoft.Dynamics.Nav.Server.exe" start= auto obj= "NT Authority\NetworkService" DisplayName= "Microsoft Dynamics NAV NAV 2009 R2"




















Default Start up RTC Service path in NAV 2009 R2 is like
localhost:7046/DynamicsNAV






No comments:

Post a Comment