NAV 2013 R2 Unable to verify table changes

In my setup I am running a Developement Environment on one computer, the Server on another and the database is on the third computer – the SQL Server.

Running Server and Database on separate machines requires a domain user account for database authentication.  What I have found is that a service running on a domain user account is unable to verify table changes.

ServerCannotBeReached

The server is running.  I can see the server instance.

AvailableServerInstances

There are two methods to get around this error.

  • Start a Server Instance on your Developement machine using domain user account
  • Start a Server Instance on your SQL server using Network Service

NAVTechDays 2013 Friday Recap

The day started in a session with Freddy Kristiansen.  This session was about the all new multi tenancy, how that is set up and how it affects the application, developement and the user.

whats-new-fig-1

In all the sessions that touched this subject it was made clear that multi tenancy is an option that is not supposed to be overly used.  This option is intended to enable both scalability and repeatability for Dynamics NAV and hence make the product an attractive solution for a cloud based ERP system.

There probably are not many existing installation of Dynamics NAV that will move to multi tenancy.

Freddy showed that by stacking service instances on a single machine to serve many customers was not an option.  Prior the only option was to install under ten instances on a single machine and that pool of instances would be able to use the same SQL server.  He had made a demo installation where he had four server instance machines, one SQL server machine and one developement and management machine.  This was all installed in Azure and running 600 tenant services behind a round robin load balancing.  In the old method the same hardware would be able to handle up to 60 instances.

The cost for each user will drop dramatically and open new market for Dynamics NAV.  Now that is something my company is going to try to make the most of.

Vjekoslav Babić was next on stage with his Microsoft .NET Interoperability Black Belt – Tips & Tricks session.  Vjeko is the go-to-guy when it comes to these matters.  He was building on his previous session for beginners and showed ways to solve some of the common problems you are likely to face when dealing with .NET Interoperability in Dynamics NAV.  Vjeko has published a post on his blog about his session where he shares all the code examples he used, a great treasure for us developers.

The last Dynamics NAV session was from Luc van Vugt.  This session was about source control with Microsoft Team Foundation Server (Service).  Luc showed us how his company is solving the problem and showed that for a small company Microsoft has a free cloud service available.  Take a look at his blog for further details.

In the last slot we had Jamie Anderson speaking about Lady Gaga and the method used to get her to the top spot in the digital world.  Jamie is a brilliant performer and this was both fun and interesting closing to this great conference.

I hope to see most of you next year in November 20th -21st.

Thursday at NAVTechDays 2013

Today started early as the bus waited outside the hotel to bring us to the conference.  After looking through the exhibition all attendees sat down to listen to the opening keynote from Michael Nielsen and Thomas Hejlsberg from Microsoft Developement Center in Copenhagen (MDCC).

The spent some time looking at the changes made to Dynamics NAV over the last year with the release of NAV 2013 R2 and  gave us some demos on how the new client works with SharePoint and Office 365.  We also saw a short demo on client addins.

They also spoke about what we could expect in the next version that is scheduled for release next fall.  They aim to make the reporting story more succesful and continue to simplify the user experience.

Some time was spent on going through the response from the community about NAV 2013 R2.  The loudest one, that there are no more FBK files will be solved as they plan to release PowerShell commands to create and restore backup files with similar functionality as we had gotten used to in the old method.  This will be even better because it will be scriptable and much faster.

The compilation of feedback and the response have been put into the attached PDF document MicrosoftDynamicsNAV2013R2_ReleaseNotesFollowup.

Next session was with Claus Lundstrøm on creating and upgrading reports in NAV 2013 (R2).  Claus truly is the master of RDLC Reporting and showed few of his tips and trick in this session.  This will most likely help us all to create better reports in a shorter time for our future projects.  For anyone that is in the process of upgrading and creating reports for newer NAV versions, one of the favorite sites should be Claus’s blog site.

Claus has a public SkyDrive where he shares a lot of goodies.  I hope Claus will soon find time to upload the report template that he created and showed in this session.

After lunch Vincent Nicolas and Horina Serbanescu had a session about what’s new in Dynamics NAV 2013 R2 client.  I really liked the dynamics between them and how they worked together to deliver the content.  I believe that everyone in the room could understand what they showed and they kept it interesting and fresh.  Brilliant job and I applaud them.

The last session was about NAV deployment, both to Azure and on local premises.  Kamil Koclega and Tomasz Truszkiewicz had the tough job to speak about this new and therefore complex matter in a very short time.  They showed a lot of interesting things and I will gain a lot from this session.  The topic was a hard one but they did a god job.

More sessions and more info to come.  Later…

Pre-Conference day at NAVTechDays 2013

Just finished the first day at NAVTechDays 2013.  This was a day where I would have liked to be able to be in three places at once.

Claus was going through reporting and I missed that.

Vjeko was going through .NET interop and I missed that.

I was with Mark, Gary and Eric going through design patterns and the PRS methodology.

logo

This is all about developing solutions that follow patterns and are easy to understand, maintain and upgrade.  So easy that when you read through the code you should be able to read in plain English what the code is doing.  Would it not be easier to customize a solution that is written in that way?

One part is about using a specific pattern when creating objects.  For example a Table is handled as a Class with data, methods and properties.  The goal is that all business logic that belongs to that table should be accessible through functions (methods) on that table.

And why would I want to miss the other two classes for this one ?

Because this methodology does not only apply to Microsoft.  It also applies to every partner and every developer that works with Microsoft Dynamics NAV.  Every partner should find a way to implement the PRS methodology and contribute to the work to help creating a general guidelines in how we want Dynamics NAV solutions to be designed and programmed.

To help consultants and developers several designing patterns have already been published.  We worked on more patterns and hopefully Microsoft will have more patterns online very soon.  These patterns help partners to create new solutions and to customize others in a standardized and reusable way.  Following the pattern also makes sure that everything that is needed is included.

The patterns are published on the official dynamics community page.  Just take a look.

Where is my NAS Company ?

I have now gone through my first upgrade from NAV 2013 to NAV 2013 R2.

  • Stopped and uninstalled NAV 2013 Server
  • Opened NAV 2013 database with NAV 2013 Developement Environment and upgraded the database
  • Compiled all system tables (2000000004-2000000130)
  • Installed and started NAV 2013 R2 Server
  • Compiled all objects
  • Imported Upgrade700701.IS.1.fob from the NAV 2013 R2 DVD – where IS is the localized version
  • Started Page 104001 in every company and executed “Transfer Data”
  • Started Page 104001 and executed “Delete Objects”
  • Imported NAV 2013 R2 fob file with the application
  • Restarted NAV 2013 R2 Server
  • Imported Upgrade700701.IS.2.fob from the NAV 2013 R2 DVD – where IS is the localized version
  • Started Page 104002 in every company and executed “Transfer Data”
  • Started Page 104001 and executed “Delete Unused Tables” and “Delete Upgrade Toolkit”

There where a few things I would have liked to go better.

  • I needed to upload the developer license to the database to be able to upgrade.  In an environment where multiple databases share the same license this could be a problem.
  • Codeunit 104004 only deletes the upgrade data for the current company as if the upgrade process is not designed to run for a database with more than one company.  Tables 104003 and 104037 are not emptied.  There is no way to execute this Codeunit for all companies since it is deleted in the first execution.  Therefore I needed to manually empty the upgrade tables and delete them.
  • Another problem with Codeunit 104004 is that is does not delete the Queries 104001 – 104004.  I needed to manually delete them after the upgrade process.

I sure would like Microsoft to take a look at these issues and find a solution.

Then I wanted to start the NAS Service.  In the Server Administration I did not see the NAS Company setting.  I looked at the documentation for Configuring NAS Service and found

Setting Description
NAS Company Specifies the Microsoft Dynamics NAV company that opens when NAS services start.

So I asked my MVP’s for the answer and Arend-Jan Kauffmann answered.

NAVAdministration

The PowerShell parameter changes from NASCompany to ServiceDefaultCompany.

In the documentation it states that

It is recommended that you create a separate Microsoft Dynamics NAV Server instance for each NAS services application. See How to: Create a Microsoft Dynamics NAV Server Instance.

There are multiple reasons for running NAS services sessions in dedicated Microsoft Dynamics NAV Server instances:

  • Efficiency and convenience            
     When you change any Microsoft Dynamics NAV Server setting, you must restart the instance for the change to take effect, which interrupts all services using that instance. So if you are running different types of services in the same instance—for example, RoleTailored client services and NAS services—making a change to the settings for either service type will require a server instance restart that interrupts all other service types running through that instance.
    Even for different types of NAS services applications it’s wise to run each application in a separate server instance. For example, if you will be using NAS services for a Microsoft Office Outlook Integration application and also for a Microsoft Dynamics NAV job queue application, create a separate Microsoft Dynamics NAV Server instance for each NAS services application. This way, if you need to modify settings for the Microsoft Office Outlook Integration application you will not affect the Microsoft Dynamics NAV job queue application, and vice-versa.
  • Performance            
    Configuring NAS services applications to use separate server instances makes better use of the server computer’s resources, allowing you to run more applications with less degradation.
  • Efficient error tracking            
    If a NAS services session terminates in an error, and there are no other services running on the Microsoft Dynamics NAV Server instance, the service instance terminates and can be handled like any other Windows service. For example, you could configure the Recovery tab on the Service configuration tool in Control Panel to restart or otherwise manage the service.

The same then applies to OData Services I guess – create a dedicated server instance for OData.

I used the following PowerShell script to create a new NAS Server Instance

[code]$DatabaseServerName = ‘localhost’
$DatabaseName = ‘NAV2013_COMPANY’
$ServiceInstanceName = ‘NAV2013_COMPANY’
$CompanyName = ‘Company Name’
$MgtPort = 7089
$ClientPort = $MgtPort + 1
$SoapPort = $ClientPort + 1
$ODataPort = $SoapPort + 1

Get-Credential | New-NAVServerInstance -ServerInstance $ServiceInstanceName -ServiceAccount User -ClientServicesCredentialType Windows -ClientServicesPort $ClientPort -DatabaseName $DatabaseName -DatabaseServer $DatabaseServerName -ManagementServicesPort $MgtPort -SOAPServicesPort $SoapPort -ODataServicesPort $ODataPort
Set-NAVServerInstance -ServerInstance $ServiceInstanceName -Start
Set-NAVServerConfiguration -ServerInstance $ServiceInstanceName -KeyName ‘NASServicesStartupCodeunit’ -KeyValue ‘450’
Set-NAVServerConfiguration -ServerInstance $ServiceInstanceName -KeyName ‘NASServicesStartupMethod’ -KeyValue ”
Set-NAVServerConfiguration -ServerInstance $ServiceInstanceName -KeyName ‘NASServicesStartupArgument’ -KeyValue ‘JOBQUEUE’
Set-NAVServerConfiguration -ServerInstance $ServiceInstanceName -KeyName ‘ServicesDefaultCompany’ -KeyValue $CompanyName
Set-NAVServerConfiguration -ServerInstance $ServiceInstanceName -KeyName ‘NASServicesEnableDebugging’ -KeyValue $True
Set-NAVServerInstance -ServerInstance $ServiceInstanceName -Restart[/code]

Now I can start to use NAV 2013 R2.