web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Test data transfer tool - Cannot bulk load because the file could not be opened

(0) ShareShare
ReportReport
Posted on by

When running dp.exe IMPORT C:\data\ MicrosoftDynamicsAx REMOTEMACHINE command I get the error:

System.Data.SqlClient.SqlException (0x80131904): Cannot bulk load because the file "\\LOCALMACHINE\C$\Users\username\AppData\Local\Temp\2\2ifwjsqtx.ze0" could not be opened.  Operating system error code 5(Access is denied).

I have found this related thread: https://community.dynamics.com/ax/f/33/t/148323 but it does not point to an answer that works.  This is importing from one computer, another from the original exported computer.

I have given the sql service account full access to the username user folder.  The sql service account and my account have sysadmin role on both sql servers.  I can reach said path from the said REMOTEMACHINE  with no issues.  I also can see the files being created in that folder as it tries to import the data. 

*This post is locked for comments

I have the same question (0)
  • adam260 Profile Picture
    1,871 on at

    check the owner (in mssql mgt studio properties) on the ax data + model database. It CANNOT be SA or you will run into this issue. try making it domain\axadmin

    So your case you need to look at db's MicrosoftDynamicsAx & MicrosoftDynamicsAx_model

  • adam260 Profile Picture
    1,871 on at

    also make sure when you start cmd.exe you run it in admin mode (right click on cmd.exe > run as admin)

  • Community Member Profile Picture
    on at

    The owner of the databases is NOT sa.  

    I also tried running the script from a job within sql server (so it is running as the sql server service) and I get the same error, but the username is now the sql server agent username.

    Prior to this I was running it via powershell as admin.

  • adam260 Profile Picture
    1,871 on at

    are you running this on the actual sql server machine? You shouldn't need to run as the sql service just an account that is an admin in windows + full access to the db's.

    Also I've noticed sometimes during a failed try it can lock some files and repeatably give an error message. Make sure you close out of powershell or cmd.exe and open it back up.

    While it is closed remove all of the files Users\username\AppData\Local\Temp\2\ I would also check Users\username\AppData\Local\Temp\

  • adam260 Profile Picture
    1,871 on at

    you might also want to check event viewer . I cant remember if it only logs to dp.log or dp.log + event viewer

  • Suggested answer
    Vishalb_DAX Profile Picture
    85 on at

    Try this thread!

    community.dynamics.com/.../148323

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans