Using Export-NAVApplicationObject to export e.g. codeunits from a database on Azure SQL fails

Has anyone succeeded in exporting objects from a database that is hosted on Azure SQL?

(I can get it to work from a database installed on a sql server on e.g. the same server. There I can omit user/pass/server because its on the default sql instance.)

I use this powershell command:

Export-NAVApplicationObject -DatabaseName mydb -Path C:\export\codeunit80-84.fob -DatabaseServer mydbserver.database.windows.net -Username dbadmin -Password password -Filter ‘Type=Codeunit;Id=80…84’ -LogPath C:\export

the dbadmin user is the primary one created with the azure sql server so has full rights to every database.

I’m exporting from a demo cronus NAV2016 DB, using a server with DAN (danish) set as keyboard layout.

When running the command I get the popup box with the following text and just an OK button to press.

‘No’ er ikke en valgmulighed.

Følgende indstillinger er tilgængelige:

Nej, Ja

and the error message in the console after pressing OK:

Export-NAVApplicationObject : !
At line:1 char:1

  • Export-NAVApplicationObject -DatabaseName mydb -Path C:\export\codeun …
  • CategoryInfo : NotSpecified: (:slight_smile: [Write-Error], WriteErrorException
  • FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Export-NAVApplicationObject

Hi Pete,
I don’t think that it has anything to do with Azure SQL.

I have had this error many times over the years in several versions of NAV, but only when opening the classic client/development environment. I never had it with PowerShell, but since the CmdLets are basically just executing FINSQL.EXE, then the issue should be the same.

What typically worked here for me were to delete the .ZUP file file.

Are you able to open the development environment and export manually?
And is the installed DE client also Danish?

Thanks Erik

Sorry for the late reply but deleting the .zup file really did fix the problem :slight_smile:

I was able to export using the DE client that is in Danish before I deleted the .zup file but it still must have had some settings that clashed.