{"id":751,"date":"2020-02-19T15:00:39","date_gmt":"2020-02-19T14:00:39","guid":{"rendered":"http:\/\/daxvisionerp.com\/?p=751"},"modified":"2025-10-27T08:10:17","modified_gmt":"2025-10-27T08:10:17","slug":"data-entity-export-error-azure-storage-emulator-issue","status":"publish","type":"post","link":"https:\/\/daxvisionerp.com\/home\/data-entity-export-error-azure-storage-emulator-issue\/","title":{"rendered":"Data entity export error &#8211; Azure Storage Emulator issue"},"content":{"rendered":"\n<p>I was working on a one-box developer VM that I downloaded from LCS Asset library and updated many times to the newest platform update (It is on PU32, 10.0.8 now). I faced issues with exporting data. Execution log just said &#8220;Error(s) while uploading the file-&#8220;. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/daxvisionerp.com\/wp-content\/uploads\/2020\/02\/image.png\" alt=\"\" class=\"wp-image-752\"\/><figcaption class=\"wp-element-caption\">Figure 1.: Entity export execution log: Error(s) while uploading the file-<\/figcaption><\/figure>\n\n\n\n<p>Event log said: &#8220;Error in uploading file to target uri&#8221;&#8230;&#8221;The remote server returned an error: (400) Bad Request.&#8221;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/daxvisionerp.com\/wp-content\/uploads\/2020\/02\/image-1-1024x529.png\" alt=\"\" class=\"wp-image-753\"\/><figcaption class=\"wp-element-caption\">Figure 2.: Event log: &#8220;Error in uploading file to target uri&#8221;\u2026&#8221;The remote server returned an error: (400) Bad Request.&#8221;<\/figcaption><\/figure>\n\n\n\n<p>The reason was that Azure Storage Emulator was not running, but I could not start it. I tried to install the newest version from Microsoft docs site <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/storage\/common\/storage-use-emulator#storage-emulator-command-line-tool-reference\" target=\"_blank\" rel=\"noopener\">here<\/a> and initialize using &#8216;AzureStorageEmulator.exe init&#8217; command. An error was thrown while it was trying to initialize at &#8220;Creating database AzureStorageEmulatorDb510 on SQL instance &#8216;(localdb)\\MSSQLLocalDB'&#8221; at step granting database access to the user: <\/p>\n\n\n\n<p>&#8220;Cannot create database &#8216;AzureStorageEmulatorDb510&#8217; : The login already has an account under a different user name&#8221;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/daxvisionerp.com\/wp-content\/uploads\/2020\/02\/image-2.png\" alt=\"\" class=\"wp-image-759\"\/><figcaption class=\"wp-element-caption\">Figure 3.: AzureStorageEmulator.exe init error<\/figcaption><\/figure>\n\n\n\n<p>I could have tried to fix the login name, but an easier solution was to manually create the database AzureStorageEmulatorDb510 (see detailed script below), open cmd as administrator and start the emulator by &#8220;AzureStorageEmulator.exe start&#8221; command.<\/p>\n\n\n\n<p>Script for creating the database:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>USE &#91;master]\nGO\n\n\/****** Object:  Database &#91;AzureStorageEmulatorDb510]    Script Date: 2\/19\/2020 1:31:21 PM ******\/\nCREATE DATABASE &#91;AzureStorageEmulatorDb510]\n CONTAINMENT = NONE\n ON  PRIMARY \n( NAME = N'AzureStorageEmulatorDb510', FILENAME = N'...\\MSSQL\\DATA\\AzureStorageEmulatorDb510.mdf' , SIZE = 8192KB , MAXSIZE = UNLIMITED, FILEGROWTH = 65536KB )\n LOG ON \n( NAME = N'AzureStorageEmulatorDb510_log', FILENAME = N'...\\MSSQL\\DATA\\AzureStorageEmulatorDb510_log.ldf' , SIZE = 8192KB , MAXSIZE = 2048GB , FILEGROWTH = 65536KB )\nGO\n\nALTER DATABASE &#91;AzureStorageEmulatorDb510] SET COMPATIBILITY_LEVEL = 130\nGO\n\nIF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))\nbegin\nEXEC &#91;AzureStorageEmulatorDb510].&#91;dbo].&#91;sp_fulltext_database] @action = 'enable'\nend\nGO\n\nALTER DATABASE &#91;AzureStorageEmulatorDb510] SET ANSI_NULL_DEFAULT OFF \nGO\n\nALTER DATABASE &#91;AzureStorageEmulatorDb510] SET ANSI_NULLS OFF \nGO\n\nALTER DATABASE &#91;AzureStorageEmulatorDb510] SET ANSI_PADDING OFF \nGO\n\nALTER DATABASE &#91;AzureStorageEmulatorDb510] SET ANSI_WARNINGS OFF \nGO\n\nALTER DATABASE &#91;AzureStorageEmulatorDb510] SET ARITHABORT OFF \nGO\n\nALTER DATABASE &#91;AzureStorageEmulatorDb510] SET AUTO_CLOSE OFF \nGO\n\nALTER DATABASE &#91;AzureStorageEmulatorDb510] SET AUTO_SHRINK OFF \nGO\n\nALTER DATABASE &#91;AzureStorageEmulatorDb510] SET AUTO_UPDATE_STATISTICS ON \nGO\n\nALTER DATABASE &#91;AzureStorageEmulatorDb510] SET CURSOR_CLOSE_ON_COMMIT OFF \nGO\n\nALTER DATABASE &#91;AzureStorageEmulatorDb510] SET CURSOR_DEFAULT  GLOBAL \nGO\n\nALTER DATABASE &#91;AzureStorageEmulatorDb510] SET CONCAT_NULL_YIELDS_NULL OFF \nGO\n\nALTER DATABASE &#91;AzureStorageEmulatorDb510] SET NUMERIC_ROUNDABORT OFF \nGO\n\nALTER DATABASE &#91;AzureStorageEmulatorDb510] SET QUOTED_IDENTIFIER OFF \nGO\n\nALTER DATABASE &#91;AzureStorageEmulatorDb510] SET RECURSIVE_TRIGGERS OFF \nGO\n\nALTER DATABASE &#91;AzureStorageEmulatorDb510] SET  ENABLE_BROKER \nGO\n\nALTER DATABASE &#91;AzureStorageEmulatorDb510] SET AUTO_UPDATE_STATISTICS_ASYNC OFF \nGO\n\nALTER DATABASE &#91;AzureStorageEmulatorDb510] SET DATE_CORRELATION_OPTIMIZATION OFF \nGO\n\nALTER DATABASE &#91;AzureStorageEmulatorDb510] SET TRUSTWORTHY OFF \nGO\n\nALTER DATABASE &#91;AzureStorageEmulatorDb510] SET ALLOW_SNAPSHOT_ISOLATION OFF \nGO\n\nALTER DATABASE &#91;AzureStorageEmulatorDb510] SET PARAMETERIZATION SIMPLE \nGO\n\nALTER DATABASE &#91;AzureStorageEmulatorDb510] SET READ_COMMITTED_SNAPSHOT OFF \nGO\n\nALTER DATABASE &#91;AzureStorageEmulatorDb510] SET HONOR_BROKER_PRIORITY OFF \nGO\n\nALTER DATABASE &#91;AzureStorageEmulatorDb510] SET RECOVERY SIMPLE \nGO\n\nALTER DATABASE &#91;AzureStorageEmulatorDb510] SET  MULTI_USER \nGO\n\nALTER DATABASE &#91;AzureStorageEmulatorDb510] SET PAGE_VERIFY CHECKSUM  \nGO\n\nALTER DATABASE &#91;AzureStorageEmulatorDb510] SET DB_CHAINING OFF \nGO\n\nALTER DATABASE &#91;AzureStorageEmulatorDb510] SET FILESTREAM( NON_TRANSACTED_ACCESS = OFF ) \nGO\n\nALTER DATABASE &#91;AzureStorageEmulatorDb510] SET TARGET_RECOVERY_TIME = 60 SECONDS \nGO\n\nALTER DATABASE &#91;AzureStorageEmulatorDb510] SET DELAYED_DURABILITY = DISABLED \nGO\n\nALTER DATABASE &#91;AzureStorageEmulatorDb510] SET QUERY_STORE = OFF\nGO\n\nUSE &#91;AzureStorageEmulatorDb510]\nGO\n\nALTER DATABASE SCOPED CONFIGURATION SET LEGACY_CARDINALITY_ESTIMATION = OFF;\nGO\n\nALTER DATABASE SCOPED CONFIGURATION FOR SECONDARY SET LEGACY_CARDINALITY_ESTIMATION = PRIMARY;\nGO\n\nALTER DATABASE SCOPED CONFIGURATION SET MAXDOP = 0;\nGO\n\nALTER DATABASE SCOPED CONFIGURATION FOR SECONDARY SET MAXDOP = PRIMARY;\nGO\n\nALTER DATABASE SCOPED CONFIGURATION SET PARAMETER_SNIFFING = ON;\nGO\n\nALTER DATABASE SCOPED CONFIGURATION FOR SECONDARY SET PARAMETER_SNIFFING = PRIMARY;\nGO\n\nALTER DATABASE SCOPED CONFIGURATION SET QUERY_OPTIMIZER_HOTFIXES = OFF;\nGO\n\nALTER DATABASE SCOPED CONFIGURATION FOR SECONDARY SET QUERY_OPTIMIZER_HOTFIXES = PRIMARY;\nGO\n\nALTER DATABASE &#91;AzureStorageEmulatorDb510] SET  READ_WRITE \nGO<\/code><\/pre>\n\n\n<div class=\"taxonomy-post_tag wp-block-post-terms\"><span class=\"wp-block-post-terms__prefix\"><br><\/span><a href=\"https:\/\/daxvisionerp.com\/home\/tag\/azure-storage-emulator\/\" rel=\"tag\">Azure Storage Emulator<\/a><span class=\"wp-block-post-terms__separator\">, <\/span><a href=\"https:\/\/daxvisionerp.com\/home\/tag\/data-entity\/\" rel=\"tag\">Data entity<\/a><\/div>","protected":false},"excerpt":{"rendered":"<p>I was working on a one-box developer VM that I downloaded from LCS Asset library and updated many times to the newest platform update (It is on PU32, 10.0.8 now). I faced issues with exporting data. Execution log just said &#8220;Error(s) while uploading the file-&#8220;. Event log said: &#8220;Error in uploading file to target uri&#8221;&#8230;&#8221;The [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[19],"tags":[101,83],"class_list":["post-751","post","type-post","status-publish","format-standard","hentry","category-dynamics-365fo","tag-azure-storage-emulator","tag-data-entity"],"_links":{"self":[{"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/posts\/751","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/comments?post=751"}],"version-history":[{"count":1,"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/posts\/751\/revisions"}],"predecessor-version":[{"id":1383,"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/posts\/751\/revisions\/1383"}],"wp:attachment":[{"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/media?parent=751"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/categories?post=751"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/tags?post=751"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}