Tip of the Week #15 – Easily Load a New NAV License

Developer Peter Tijsma is back this week with a follow-up to his last bit of helpful advice on multiple NAV instances.

As promised in my last tip of the week, I’ll now give you a tip on how to load a new NAV license into a database, without the need to restart any service instance(s).

 

Let’s use the same Instance setup as last time:

  • One instance used for Clients connecting using Window Credentials
  • One instance used for Clients connecting using UserName Credentials
  • One instance used for Clients connecting using NavUsernamePassword Credentials
  • One instance used for running a NAS for the NAV Job Queue
  • One instance used for running a NAS for PrintVis DCM Procssing
  • One instance used for running a NAS for PrintVis CIM Processing

 

The old-fashioned way of loading a license into the database would be to:

  • Open the database with the Development Environment (or in the old days: the Classic client)
  • Go to: File – Database – Alter
  • Go to the Tab Integration and untick “Save License in database”
  • Then click OK to close the form
  • Go back to: File – Database – Alter
  • Again to the Tab Integration and tick “Save License in database”
  • In the Browse form that pops up, select the License and click OK
  • Again close the form by clicking OK

Now, in order to get this new license activated you would need to restart every instance, so that it loads the new license from the database.

But as one can understand, this would also kick off ALL users connected to those instances and they would ALL need to reconnect. Of course this is something you’d probably do during night time when no one is connected. But what if you’re running a 24/7 organization, where the production people are always connected?

It’s at least some kind of overhead and annoyance to get a new license activated.

But… Your best friend called “Powershell” is nearby!

This nifty script will load a new license into every running instance on the server and load it into the database at the same time. The beauty of it is that since it loads it through the instance, it will be effective immediately for all connected clients – therefore, no restart of any instance is needed!

Of course, the <FullPathToLicense.flf> needs to be replaced with the full path to the NAV License flf file.

$LicenseData     = ([Byte[]]$(Get-Content -Path ‘<FullPathToLicense.flf>-Encoding Byte))

$ActiveInstances = Get-NAVServerInstance | Where { $_.State -eq ‘Running’ }

foreach ($Instance in $ActiveInstances)

{

Import-NAVServerLicense $Instance -LicenseData $LicenseData -Database NavDatabase

}

Go HERE for more info. 

Have fun!

 

Thank you Peter!

Back to Tip of the Week Main Page