Hi there,
If anyone have experience with NAV on Azure, please help. The problem is explained bellow:
*We have server which is set on Azure and the database is set on Azure SQL Database service. We need to have two NAV Service instances. One DynamicsNAV100Local, which will be used for development locally on the server, and other one DynamicsNAV100WAN for connection to the service and NAV database from WAN connection.
*Problem is, when I start one of the instance which is logged using SQL user is ok. When I start the second one, I have an error*:
<error>The Microsoft Dynamics NAV Server instance cannot connect to the application database because it is using a different password encryption key than the one currently used on the database</error>
When one of the instances will be started, key from that instance is valid and only this instance is starting, when another instance I try to start, automatically service is going to status Stop Pending >> Stopped with explanation that the encryption key is wrong.
Using specifications to set up the system, to start up the Service instance, it must to use SQL authentication.
Thank you in advice
Best Regards
0
Comments
In NAV Administration console, when you click on the second instance, did you set the parameters in the section AzureKeyVault encryption ?
I'm not sure which fields should be filled, in this section. Can you send me some manual for this steps - how to fill AzureKeyVault section.
And one more question:
If I use this option, does the client need to buy (subscribe) to Azure Key Vault to be able to use more that one Service and is this possible to be done without additional fees.
Thanks in advice
Best Regards
As I had so many issues with Azure SQL I haven't done this for a while so I cannot recall all the necessary steps.
Anyhow these two links should provide necessary information.
https://msdn.microsoft.com/en-us/library/dn951458(v=nav.90).aspx
and this one
https://msdn.microsoft.com/en-us/library/dn951464(v=nav.90).aspx
This video, explains the setup in detail
https://www.youtube.com/watch?v=_v2XFF4q0Ww
I hope this helps.
In attachment is the message which is describing the problem when I'll try to start second service
Did you run this as explained here
https://msdn.microsoft.com/en-us/library/dn951464(v=nav.90).aspx
as it was explained here
https://msdn.microsoft.com/en-us/dynamics-nav/microsoft.dynamics.nav.management/import-navencryptionkey
Microsoft Dynamics NAV uses a single encryption key per server instance.
if you did all the above and it does not work, then I am not sure what is wrong.
I would be really surprised if only one instance can be run per database.
when you create the first instance with database credentials, new key is generated and written in the database, so when you create new instance a new key is generated and written to database, because of this the first instance will stop because of missmatch key
What should you do
Delete the generated key from the second instance,
Location of the key
C:\ProgramData\Microsoft\Microsoft Dynamics NAV\100\Server\Keys
Export the key from the first instance
Export-NAVEncryptionKey -ServerInstance DynamicsNAV -KeyPath "C:\Keys\nav.key"
Import exported key in the second instance
You must provide database credentials in the -ApplicationDatabaseCredentials parameter
$Credential = (New-Object PSCredential -ArgumentList ‘<your Azure SQL Database login name>‘,(ConvertTo-SecureString -AsPlainText -Force ‘<your password>‘))
Import-NAVEncryptionKey -ServerInstance DynamicsNAV -ApplicationDatabaseServer <String>
-ApplicationDatabaseCredentials $Credential -ApplicationDatabaseName <String> -KeyPath <String>
Hope this will work
BR,
Mirce
Best Regards
When i am trying to import Key using below comments i am getting following error message .Please help me
can you send me your script, i have the same problem but dont works.
thanks
GER
The script for above is valid. I've contacted @mircen about the problem described here, and he answered that the steps will be:
(If you have key for the first database)
1. You need to copy the key from the file and name it like your new instance which will use your new database (DynamicsNAV100Example2).
2. This must be done before you start the DynamicsNAV100Example2 service instance.
The trick here is that you must to use the same key for other databases.
Best Regards