{"id":373,"date":"2017-05-11T17:42:36","date_gmt":"2017-05-11T17:42:36","guid":{"rendered":"https:\/\/wp-rpaiva.rhcloud.com\/?p=373"},"modified":"2018-04-07T11:53:32","modified_gmt":"2018-04-07T11:53:32","slug":"error-importing-nav-license-in-azuresql-database","status":"publish","type":"post","link":"https:\/\/ricardomoinhos.com\/pt\/error-importing-nav-license-in-azuresql-database\/","title":{"rendered":"Error importing NAV License in AzureSQL Database"},"content":{"rendered":"<p>When\u00a0opening a database installed in AzureSQL, you may get this error:<\/p>\n<blockquote><p><strong>The database on the server requires a Per Database license to be opened on SQL Azure<\/strong><\/p><\/blockquote>\n<p>You must use Powershell to import the Dynamics NAV license.\u00a0To import a license file to a AzureSQL database I used the following command:<\/p>\n<blockquote><p>Import-NAVServerLicense DynamicsNAV100 -LicenseData ([Byte[]]$(Get-Content -Path &#8220;C:\\Licenses\\NAV_2017_DEV.flf&#8221; -Encoding Byte))<\/p><\/blockquote>\n<p>But I was having the following error:<\/p>\n<blockquote><p><strong>Reference to database and\/or server name in &#8216;master.dbo.$ndo$srvproperty&#8217; is not supported in this version of SQL Server<\/strong><\/p><\/blockquote>\n<p>To resolve it, I needed to add an additional parameter to the command: &#8220;-Database 2&#8221;.<\/p>\n<blockquote><p>Import-NAVServerLicense DynamicsNAV100 -LicenseData ([Byte[]]$(Get-Content -Path &#8220;C:\\Licenses\\NAV_2017_DEV.flf&#8221; -Encoding Byte)) -Database 2<\/p><\/blockquote>\n<p>UPDATE: In order to use this command, you have to import Dynamics NAV powershell modules running this &#8220;Import-Module &#8220;C:\\Program Files\\Microsoft Dynamics NAV\\100\\Service\\NAVAdminTool.ps1&#8243; -force&#8221;, prior to using the Import-NAVServerLicense command.<\/p>\n<p>&nbsp;<\/p>\n<p>From Microsoft Dynamics NAV 2016 documentation:<\/p>\n<p><a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/jj672905(v=nav.90).aspx\">https:\/\/msdn.microsoft.com\/en-us\/library\/jj672905(v=nav.90).aspx<\/a><\/p>\n<blockquote>\n<h3 class=\"subHeading\">-Database&lt;LicenseDatabase&gt;<\/h3>\n<\/blockquote>\n<div class=\"subSection\">\n<blockquote><p>Specifies the database into which to import the license file. The possible values are described in the following list:<\/p>\n<p><code>Default<\/code> = 0<\/p>\n<p>Default; overrides the license file currently in use.<\/p>\n<p><code>Master<\/code> = 1<\/p>\n<p>Forces the license file to be global.<\/p>\n<p><code>NavDatabase<\/code> = 2<\/p>\n<p>Forces the license file to be local and stored in the Microsoft Dynamics NAV database that is used by the specified Microsoft Dynamics NAV Server instance.<\/p>\n<p><code>Tenant<\/code> = 3<\/p>\n<p>Forces the license file to be local and stored in the Microsoft Dynamics NAV database that is used by the tenant that is specified in the <em>Tenant<\/em> parameter.<\/p><\/blockquote>\n<\/div>\n<p>&nbsp;<\/p>\n<p>Regards,<br \/>\nRicardo Paiva Moinhos<br \/>\n<a href=\"https:\/\/wp-rpaiva.rhcloud.com\">www.ricardomoinhos.com<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When\u00a0opening a database installed in AzureSQL, you may get this error: The database on the server requires a Per Database license to be opened on SQL Azure You must use Powershell to import the Dynamics NAV license.\u00a0To import a license file to a AzureSQL database I used the following command: Import-NAVServerLicense DynamicsNAV100 -LicenseData ([Byte[]]$(Get-Content -Path [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":138,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","_links_to":"","_links_to_target":""},"categories":[4],"tags":[52,53,6],"class_list":{"0":"post-373","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","6":"hentry","7":"category-dynamics365bc","8":"tag-azure","9":"tag-azuresql","10":"tag-dynamicsnav-2","12":"post-with-thumbnail","13":"post-with-thumbnail-icon"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Error importing NAV License in AzureSQL Database - Ricardo Paiva Moinhos<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ricardomoinhos.com\/error-importing-nav-license-in-azuresql-database\/\" \/>\n<meta property=\"og:locale\" content=\"pt_PT\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Error importing NAV License in AzureSQL Database - Ricardo Paiva Moinhos\" \/>\n<meta property=\"og:description\" content=\"When\u00a0opening a database installed in AzureSQL, you may get this error: The database on the server requires a Per Database license to be opened on SQL Azure You must use Powershell to import the Dynamics NAV license.\u00a0To import a license file to a AzureSQL database I used the following command: Import-NAVServerLicense DynamicsNAV100 -LicenseData ([Byte[]]$(Get-Content -Path [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ricardomoinhos.com\/error-importing-nav-license-in-azuresql-database\/\" \/>\n<meta property=\"og:site_name\" content=\"Ricardo Paiva Moinhos\" \/>\n<meta property=\"article:published_time\" content=\"2017-05-11T17:42:36+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-04-07T11:53:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ricardomoinhos.com\/wp-content\/uploads\/2014\/06\/PT_c_Dyn-NAV-2013.png\" \/>\n\t<meta property=\"og:image:width\" content=\"375\" \/>\n\t<meta property=\"og:image:height\" content=\"375\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Ricardo Paiva Moinhos\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ricardo Paiva Moinhos\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tempo estimado de leitura\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minuto\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/ricardomoinhos.com\\\/error-importing-nav-license-in-azuresql-database\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ricardomoinhos.com\\\/error-importing-nav-license-in-azuresql-database\\\/\"},\"author\":{\"name\":\"Ricardo Paiva Moinhos\",\"@id\":\"https:\\\/\\\/ricardomoinhos.com\\\/#\\\/schema\\\/person\\\/16dcfdd54ec1c46bd1941659739de4cc\"},\"headline\":\"Error importing NAV License in AzureSQL Database\",\"datePublished\":\"2017-05-11T17:42:36+00:00\",\"dateModified\":\"2018-04-07T11:53:32+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/ricardomoinhos.com\\\/error-importing-nav-license-in-azuresql-database\\\/\"},\"wordCount\":278,\"commentCount\":5,\"image\":{\"@id\":\"https:\\\/\\\/ricardomoinhos.com\\\/error-importing-nav-license-in-azuresql-database\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/ricardomoinhos.com\\\/wp-content\\\/uploads\\\/2014\\\/06\\\/PT_c_Dyn-NAV-2013.png\",\"keywords\":[\"azure\",\"azuresql\",\"dynamicsnav\"],\"articleSection\":[\"Dynamics NAV\\\/365 BC\"],\"inLanguage\":\"pt-PT\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/ricardomoinhos.com\\\/error-importing-nav-license-in-azuresql-database\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/ricardomoinhos.com\\\/error-importing-nav-license-in-azuresql-database\\\/\",\"url\":\"https:\\\/\\\/ricardomoinhos.com\\\/error-importing-nav-license-in-azuresql-database\\\/\",\"name\":\"Error importing NAV License in AzureSQL Database - Ricardo Paiva Moinhos\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ricardomoinhos.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/ricardomoinhos.com\\\/error-importing-nav-license-in-azuresql-database\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/ricardomoinhos.com\\\/error-importing-nav-license-in-azuresql-database\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/ricardomoinhos.com\\\/wp-content\\\/uploads\\\/2014\\\/06\\\/PT_c_Dyn-NAV-2013.png\",\"datePublished\":\"2017-05-11T17:42:36+00:00\",\"dateModified\":\"2018-04-07T11:53:32+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/ricardomoinhos.com\\\/#\\\/schema\\\/person\\\/16dcfdd54ec1c46bd1941659739de4cc\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/ricardomoinhos.com\\\/error-importing-nav-license-in-azuresql-database\\\/#breadcrumb\"},\"inLanguage\":\"pt-PT\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/ricardomoinhos.com\\\/error-importing-nav-license-in-azuresql-database\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-PT\",\"@id\":\"https:\\\/\\\/ricardomoinhos.com\\\/error-importing-nav-license-in-azuresql-database\\\/#primaryimage\",\"url\":\"https:\\\/\\\/ricardomoinhos.com\\\/wp-content\\\/uploads\\\/2014\\\/06\\\/PT_c_Dyn-NAV-2013.png\",\"contentUrl\":\"https:\\\/\\\/ricardomoinhos.com\\\/wp-content\\\/uploads\\\/2014\\\/06\\\/PT_c_Dyn-NAV-2013.png\",\"width\":375,\"height\":375},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/ricardomoinhos.com\\\/error-importing-nav-license-in-azuresql-database\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/ricardomoinhos.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Error importing NAV License in AzureSQL Database\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/ricardomoinhos.com\\\/#website\",\"url\":\"https:\\\/\\\/ricardomoinhos.com\\\/\",\"name\":\"Ricardo Paiva Moinhos\",\"description\":\"Welcome\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/ricardomoinhos.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"pt-PT\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/ricardomoinhos.com\\\/#\\\/schema\\\/person\\\/16dcfdd54ec1c46bd1941659739de4cc\",\"name\":\"Ricardo Paiva Moinhos\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-PT\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/248366f4e615e182964f85f799c6e33cbd541a6f4ca7ee948fc16d1c14030c76?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/248366f4e615e182964f85f799c6e33cbd541a6f4ca7ee948fc16d1c14030c76?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/248366f4e615e182964f85f799c6e33cbd541a6f4ca7ee948fc16d1c14030c76?s=96&d=mm&r=g\",\"caption\":\"Ricardo Paiva Moinhos\"},\"url\":\"https:\\\/\\\/ricardomoinhos.com\\\/pt\\\/author\\\/ricardopaiva\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Error importing NAV License in AzureSQL Database - Ricardo Paiva Moinhos","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ricardomoinhos.com\/error-importing-nav-license-in-azuresql-database\/","og_locale":"pt_PT","og_type":"article","og_title":"Error importing NAV License in AzureSQL Database - Ricardo Paiva Moinhos","og_description":"When\u00a0opening a database installed in AzureSQL, you may get this error: The database on the server requires a Per Database license to be opened on SQL Azure You must use Powershell to import the Dynamics NAV license.\u00a0To import a license file to a AzureSQL database I used the following command: Import-NAVServerLicense DynamicsNAV100 -LicenseData ([Byte[]]$(Get-Content -Path [&hellip;]","og_url":"https:\/\/ricardomoinhos.com\/error-importing-nav-license-in-azuresql-database\/","og_site_name":"Ricardo Paiva Moinhos","article_published_time":"2017-05-11T17:42:36+00:00","article_modified_time":"2018-04-07T11:53:32+00:00","og_image":[{"width":375,"height":375,"url":"https:\/\/ricardomoinhos.com\/wp-content\/uploads\/2014\/06\/PT_c_Dyn-NAV-2013.png","type":"image\/png"}],"author":"Ricardo Paiva Moinhos","twitter_card":"summary_large_image","twitter_misc":{"Escrito por":"Ricardo Paiva Moinhos","Tempo estimado de leitura":"1 minuto"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ricardomoinhos.com\/error-importing-nav-license-in-azuresql-database\/#article","isPartOf":{"@id":"https:\/\/ricardomoinhos.com\/error-importing-nav-license-in-azuresql-database\/"},"author":{"name":"Ricardo Paiva Moinhos","@id":"https:\/\/ricardomoinhos.com\/#\/schema\/person\/16dcfdd54ec1c46bd1941659739de4cc"},"headline":"Error importing NAV License in AzureSQL Database","datePublished":"2017-05-11T17:42:36+00:00","dateModified":"2018-04-07T11:53:32+00:00","mainEntityOfPage":{"@id":"https:\/\/ricardomoinhos.com\/error-importing-nav-license-in-azuresql-database\/"},"wordCount":278,"commentCount":5,"image":{"@id":"https:\/\/ricardomoinhos.com\/error-importing-nav-license-in-azuresql-database\/#primaryimage"},"thumbnailUrl":"https:\/\/ricardomoinhos.com\/wp-content\/uploads\/2014\/06\/PT_c_Dyn-NAV-2013.png","keywords":["azure","azuresql","dynamicsnav"],"articleSection":["Dynamics NAV\/365 BC"],"inLanguage":"pt-PT","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ricardomoinhos.com\/error-importing-nav-license-in-azuresql-database\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ricardomoinhos.com\/error-importing-nav-license-in-azuresql-database\/","url":"https:\/\/ricardomoinhos.com\/error-importing-nav-license-in-azuresql-database\/","name":"Error importing NAV License in AzureSQL Database - Ricardo Paiva Moinhos","isPartOf":{"@id":"https:\/\/ricardomoinhos.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ricardomoinhos.com\/error-importing-nav-license-in-azuresql-database\/#primaryimage"},"image":{"@id":"https:\/\/ricardomoinhos.com\/error-importing-nav-license-in-azuresql-database\/#primaryimage"},"thumbnailUrl":"https:\/\/ricardomoinhos.com\/wp-content\/uploads\/2014\/06\/PT_c_Dyn-NAV-2013.png","datePublished":"2017-05-11T17:42:36+00:00","dateModified":"2018-04-07T11:53:32+00:00","author":{"@id":"https:\/\/ricardomoinhos.com\/#\/schema\/person\/16dcfdd54ec1c46bd1941659739de4cc"},"breadcrumb":{"@id":"https:\/\/ricardomoinhos.com\/error-importing-nav-license-in-azuresql-database\/#breadcrumb"},"inLanguage":"pt-PT","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ricardomoinhos.com\/error-importing-nav-license-in-azuresql-database\/"]}]},{"@type":"ImageObject","inLanguage":"pt-PT","@id":"https:\/\/ricardomoinhos.com\/error-importing-nav-license-in-azuresql-database\/#primaryimage","url":"https:\/\/ricardomoinhos.com\/wp-content\/uploads\/2014\/06\/PT_c_Dyn-NAV-2013.png","contentUrl":"https:\/\/ricardomoinhos.com\/wp-content\/uploads\/2014\/06\/PT_c_Dyn-NAV-2013.png","width":375,"height":375},{"@type":"BreadcrumbList","@id":"https:\/\/ricardomoinhos.com\/error-importing-nav-license-in-azuresql-database\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ricardomoinhos.com\/"},{"@type":"ListItem","position":2,"name":"Error importing NAV License in AzureSQL Database"}]},{"@type":"WebSite","@id":"https:\/\/ricardomoinhos.com\/#website","url":"https:\/\/ricardomoinhos.com\/","name":"Ricardo Paiva Moinhos","description":"Welcome","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ricardomoinhos.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"pt-PT"},{"@type":"Person","@id":"https:\/\/ricardomoinhos.com\/#\/schema\/person\/16dcfdd54ec1c46bd1941659739de4cc","name":"Ricardo Paiva Moinhos","image":{"@type":"ImageObject","inLanguage":"pt-PT","@id":"https:\/\/secure.gravatar.com\/avatar\/248366f4e615e182964f85f799c6e33cbd541a6f4ca7ee948fc16d1c14030c76?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/248366f4e615e182964f85f799c6e33cbd541a6f4ca7ee948fc16d1c14030c76?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/248366f4e615e182964f85f799c6e33cbd541a6f4ca7ee948fc16d1c14030c76?s=96&d=mm&r=g","caption":"Ricardo Paiva Moinhos"},"url":"https:\/\/ricardomoinhos.com\/pt\/author\/ricardopaiva\/"}]}},"jetpack_featured_media_url":"https:\/\/ricardomoinhos.com\/wp-content\/uploads\/2014\/06\/PT_c_Dyn-NAV-2013.png","jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ricardomoinhos.com\/pt\/wp-json\/wp\/v2\/posts\/373","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ricardomoinhos.com\/pt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ricardomoinhos.com\/pt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ricardomoinhos.com\/pt\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ricardomoinhos.com\/pt\/wp-json\/wp\/v2\/comments?post=373"}],"version-history":[{"count":6,"href":"https:\/\/ricardomoinhos.com\/pt\/wp-json\/wp\/v2\/posts\/373\/revisions"}],"predecessor-version":[{"id":448,"href":"https:\/\/ricardomoinhos.com\/pt\/wp-json\/wp\/v2\/posts\/373\/revisions\/448"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ricardomoinhos.com\/pt\/wp-json\/wp\/v2\/media\/138"}],"wp:attachment":[{"href":"https:\/\/ricardomoinhos.com\/pt\/wp-json\/wp\/v2\/media?parent=373"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ricardomoinhos.com\/pt\/wp-json\/wp\/v2\/categories?post=373"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ricardomoinhos.com\/pt\/wp-json\/wp\/v2\/tags?post=373"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}