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)

Retail data sync can't connect to database

(0) ShareShare
ReportReport
Posted on by 4,921

Hi all people,

I can't found the distribution Location In Retail scheduler to Add the POs Database to distribution Location and distribution Location list.

When i run the Register (1090) in Distribution Schedule, i have this error :

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) ---> System.ComponentModel.Win32Exception: Le chemin réseau n’a pas été trouvé

   --- End of inner exception stack trace ---

   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)

   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)

   at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, Boolean withFailover)

   at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover)

   at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout)

   at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance)

   at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions)

   at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)

   at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)

   at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnectionOptions userOptions)

   at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnectionOptions userOptions)

   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)

   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)

   at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)

   at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)

   at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)

   at System.Data.SqlClient.SqlConnection.Open()

   at Microsoft.Dynamics.Retail.SynchLibrary.Metadata.MetadataSyncSession.Update()

   at Dynamics.Ax.Application.RetailCDXMetadataSync.syncMetadataPush(Boolean fullSync, Boolean ) in RetailCDXMetadataSync.syncMetadataPush.xpp:line 255

   at Dynamics.Ax.Application.RetailCDXDataSync.Run() in RetailCDXDataSync.run.xpp:line 11

   at Dynamics.Ax.Application.RetailCDXDataSync.sync(Object[] params) in RetailCDXDataSync.sync.xpp:line 35

   --- End of inner exception stack trace ---

If some one have a response.

Thakns for all.

*This post is locked for comments

I have the same question (0)
  • Nirvana115 Profile Picture
    4,921 on at

    If some one have a response.

    Thakns for you.

  • Nirvana115 Profile Picture
    4,921 on at

    Any help pls....

  • André Arnaud de Calavon Profile Picture
    300,911 Super User 2025 Season 2 on at

    Hi Nirvana,

    Thanks for pinging. I'm not familiar with setting up retail components, but I saw an interesting part in your error log:

    ------------------------

    System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) ---> System.ComponentModel.Win32Exception: Le chemin réseau n’a pas été trouvé

    -------------------------

    This could mean that you mistyped connection information or you (or the user specified) do not have the permissions to access the SQL server. Probably you can also review the SQL server on some error logs.

    Hope this will point you in the right direction.

  • Sanjoy Seal Profile Picture
    145 on at

    I am also facing the same problem. Pls help

  • Community Member Profile Picture
    on at

    Hi Nirvana,

    I think I saw similar error on my setup during configuration.

    First, from the POS-side, can you run the "Async Client configuration tool", and to all test run ok? If they are not testing OK, you wont be able to find the Channel Database (Retail>Setup>Retail Scheduler>channel integration>Channel Database) you setup in AX HQ.

    Start with the ACC-tool and do all the test OK, and then go to both "Channel Database" and "Channel Data group" in AX HQ and do a "full data sync" with the "9999-All jobs" in.

    Good luck!

  • Verified answer
    Community Member Profile Picture
    on at

    Nirvana / Andre,  I was struggling with this error as well.  Here's what I did to resolve.

    ------------------------

    1. In AX, within the Retail Setup > Retail Scheduler Parameters > General Tab.

    - Server Name: ax2012R2a (changed from retail.contoso.com)

    - Database Server Instance (blank)

    - Database Name: ASyncServerHeadOffice (matching the HO message DB name in SQL)

    Click the Sync Metadata button. If it is successful then it is configured correctly.

    2. Within IIS, we have to do a few things:

    - On the ASyncServerSite application pool click on "Bindings" on the right hand side.

    - In the HTTPs connection (port 8303) click Edit. Ensure the hostname field is blank. Change the SSL certificate from Retail to "AX2012R2A" in the dropdown. Close out of that window.

    - Click on the server AX2012R2A and restart the IIS server.

    (we might have to turn on directory browsing on both the ASyncServer site and the ASyncServerSite app pool as well)

    3. Open the ASyncServerConfigurationUtility.exe for the store you wish to troubleshoot in C:\Program Files (x86)\Microsoft Dynamics AX\Common\60\CDX .

    The async server connection tab:

    - Change the server name from retail.contoso.com to ax2012r2a.contoso.com. Confirm the application name is ASyncServer. Port should be 8303.

    - The channel database ID, username and PW should match the values within the Setup > Retail Scheduler > Channel Integration > Channel Database.

    The channel configuration tab:

    - Configure the Server Names and Database names respectively for the message/channel DBs. I didn't change any values here.

    - Message DB: AX2012R2A / ASyncClientSeattleStore

    - Channel DB: AX2012R2A / RetailSeattleStore

    Test all the connections, they should all work. If all the test connections work out, make sure you go to Services and restart the service.

    4. Back in AX, test a distribution job to see if it works (ie. 1010). You can consult the Retail > Inquiries > CDX > "Download Session" form.

    ---------------

    Hopefully that sets you straight!

  • Community Member Profile Picture
    on at

    @Nirvana,

    Did you able to fix it after following steps above ?

  • Community Member Profile Picture
    on at

    I get the this error when during the test connection between async server and async client.

  • Suggested answer
    Community Member Profile Picture
    on at

    Hello,


    Default R3 demo does not have entries in hosts file; add please entries:

    127.0.0.1    www.contoso.com
    127.0.0.1    www.fabrikam.com
    127.0.0.1    intranet.contoso.com
    127.0.0.1    dynamicsax.contoso.com
    127.0.0.1    sharepoint
    127.0.0.1    ax2012r2a
    127.0.0.1    retail.contoso.com retail


    to C:\Windows\System32\drivers\etc\hosts file, and it will work (assuming obviously that you are running R3 demo from partnersource)


    regards

    Tomasz

  • Community Member Profile Picture
    on at

    Hi Drew,

    What if upon running the Sync Metadata button. The same error prompt? :(

    Thanks,

    Chi Rivera

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