Closed GreatScott000 closed 3 years ago
So I may be onto the problem related to encryption keys. Checking that out now. (Realized this while writing up the problem).
So, I have imported the encryption into the database. The same on that was used to create the container. Still get the error. So I think the Invoke-NAVApplicationDatabaseConversion
function is using the service account (NT Authority\System) to authentication and not the username/password configured for the service.
How do I fix this?
There is a parameter called ApplicationDatabaseCredentials - I guess that should be your sqlcredential
Thank you @freddydk I looked at the "help" in PowerShell ISE about 19 times yesterday sure that it should have something like that and did not see it (nor did my 3 juniors when I asked for their help). I got distracted by the message which I suppose is technically accurate but not complete. I will try it out and see what happens. I am sure it will work.
That worked. Thanks again! Sometimes I get "tunnel vision" and just need another perspective.
PLEASE DO NOT INCLUDE ANY PASSWORDS OR TOKENS IN YOUR ISSUE!!!
Describe the issue I am trying to invoke the database conversion for BC17 in a container that is connected to a remote SQL server, I am getting this error
The database is accessible from inside the container as proven in the script below.
With this result
I found this entry in the remote SQL server's event log:
So I added NT AUTHORITY\ANONYMOUS LOGON and gave it sysadmin rights and the
Invoke-NAVApplicationDatabaseConversion
command works. However this is a huge security risk. There has to be a better way.Shouldn't the command be using the database user and password set in the container? It has worked all through the process of converting this database from NAV2016, and BC14. It what is being passed as the SQLCredential above for the commands. If so, what am I missing?
Is there a way to set the container's NAV service account to be something that the remote SQL server will recognize?
This is how the service looks
This is the container's NAV service config
Scripts used to create container and cause the issue
Full output of scripts
Screenshots If applicable, add screenshots to help explain your problem.
Additional context