NAV2015: PowerShell Import-NAVData tenant error

paurolapaurola Member Posts: 43
edited 2014-10-15 in NAV Three Tier
Hi.
I am trying to import a full "backup" from a .navdata file into an empty NAV database, but I get an error:

Import-NAVData : Tenant default in database NAV_2015 is not operational
. The tenant can be brought to operational state by a call to Sync-NavTenant.
At line:1 char:1
+ Import-NAVData -ServerInstance NAV_2015 -IncludeApplicationdata -ALLC
omp ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~

What is this? I do not have any tenants, this is an empty NAV2015 database with a service that has the "tenant" check box empty. The PowerShell command I am using is as follows (I am not sure if this is correct, because I cant get pass of this tenant error):

PS C:\Windows\system32> Import-NAVData -AllCompanies -IncludeApplicationdata -IncludeGlobalData -ServerInstance NAV_2015 -FilePath C:\temp\NAV_CRONUS_2015.navdata

How difficult would it have been to integrate this PowerShell Cmdlet in GUI of the Admin tool or the Development Environment...

Comments

  • mohana_cse06mohana_cse06 Member Posts: 5,503
    Did you try to "Sync. Schema for All Tables" with Validation under Tools of development Environment?
  • paurolapaurola Member Posts: 43
    Did you try to "Sync. Schema for All Tables" with Validation under Tools of development Environment?
    No, I did not. But I did not have any objects in the database (except the system tables in 2000000000-series), do you think that still might have had an effect? I will have to test that.

    I would really like to know what is going on here, but in the meantime I can tell you my workaround. Instead of using the parameter ServerInstance I used parameters ApplicationDatabaseName and ApplicationDatabaseServer. After the sript was run there was still nothing in the database even though the script did not show any errors. I then imported all objects from a fob-file and ran the script again, this time without the IncludeApplicationdata and I finally had a new working db with the data from the navdata file.
Sign In or Register to comment.