Import License bug in NAV 2013 R2 multi-tenant w\ multi-SQL

benrbenr Member Posts: 11
edited 2014-09-19 in NAV Three Tier
Hi All,

In my multi-tenant development environment I've got an Application Database on a SQL 2008 R2 box (SQL1). Tenants that are mounted to this app db are located on both SQL1 and another SQL 2012 box (SQL2). I've discovered that when I try to Import a license into a Tenant the Import always fails for the tenants on SQL2 with the error "Invalid object name 'TenantDBName.dbo.$ndo$tenantproperty'.". I ran SQL Profiler and it turns out it is looking for the Tenant on SQL1 to import the license into even though the Tenant is mounted to SQL2! It seems like it is assuming all tenants are mounted on the same SQL Server as the app db.

Fortunately our prod multi-tenant environments don't have multiple SQL Servers so this is just a development issue for now. Has anyone else come across this behavior?



  • Options
    kpytokpyto Member Posts: 9
    We have similar issue. 2 NAV servers (7.10.35473) in multi-tenant mode and 2 SQL 2012 servers. One application data database for both, locationed on first SQL server. Tenants databases stored at both SQL servers. When i try to import new license to tenant, which database located not on the same SQL server with application database, import fails with error:
    Import-NAVServerLicense : The following SQL error was unexpected.
    Invalid object name 'database.dbo.$ndo$tenantproperty'.

    No solution at the moment.
  • Options
    benrbenr Member Posts: 11
    I've found a couple of workarounds. The powershell command is running the SQL on the app SQL server instead of the tenant SQL server. You can run Profiler on the app SQL Server, capture the SQL command, and paste it in a query window and run it on the tenant SQL server against the tenant. That gets the value in the $ndo$tenantproperty.license column, but you have to dismount/remount the tenant for it to be seen by the service.

    Another workaround is to have 1 tenant on your app SQL Server and load the license there. Then use TSQL to join your tenant SQL server to your app SQL server via a linked server and update the $ndo$tenantproperty.license column that way. Again you have to dismount\remount for it to take effect (or restart the entire service of course).

    Neither workaround is fun, but we only have this setup in our development environment so it hasn't caused us too much grief.

Sign In or Register to comment.