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 :
Finance | Project Operations, Human Resources, ...
Unanswered

database synchronization

(0) ShareShare
ReportReport
Posted on by 120

Hi All, 

im trying to synchronize database using the following script:

K:\AOSService\webroot\bin\Microsoft.Dynamics.AX.Deployment.Setup.exe
-bindir "K:\AosService\PackagesLocalDirectory"
metadatadir "K:\AosService\PackagesLocalDirectory"
-sqluser "axdbadmin" -sqlserver "." -sqldatabase "AxDB"
-setupmode "sync" -syncmode "fullall"
-isazuresql "false" -sqlpwd "*"
-logfilename "H:\MSSQL_LOGS\AxDB_log.log"

but i got this error and it's related to all arguments used:


-metadatadir : The term '-metadatadir' is not recognized as the name of a cmdlet,

-sqluser : The term '-sqluser' is not recognized as the name of a cmdlet, function ............

I have the same question (0)
  • Martin Dráb Profile Picture
    237,801 Most Valuable Professional on at

    I think you're trying to execute each line as a separate command, which it should be a single command.

    Also, you forgot a dash before metadatadir. It should be "-metadatadir", not just "metadatadir".

  • Microsoft Dynamics 365 Community Profile Picture
    120 on at

    i got this error

    J:\AOSService\webroot\bin\Microsoft.Dynamics.AX.Deployment.Setup.exe : 01/26/2022 12:07:55: Caught unexpected exception:

    At line:1 char:1

    + J:\AOSService\webroot\bin\Microsoft.Dynamics.AX.Deployment.Setup.exe  ...

    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

       + CategoryInfo          : NotSpecified: (01/26/2022 12:0...cted exception::String) [], RemoteException

       + FullyQualifiedErrorId : NativeCommandError

    System.AggregateException: Unable to connect to SQL server. ---> 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: The network path was not found

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

  • Martin Dráb Profile Picture
    237,801 Most Valuable Professional on at

    Please do what the error message is saying: Verify that the instance name is correct and that SQL Server is configured to allow remote connections.

  • Microsoft Dynamics 365 Community Profile Picture
    120 on at

    yes

    i got this error:

    k:\AOSService\webroot\bin\Microsoft.Dynamics.AX.Deployment.Setup.exe : 01/26/2022 16:17:33: Microsoft.Dynamics.AX.InitializationException: Failed to initialize OCC

  • Microsoft Dynamics 365 Community Profile Picture
    120 on at

    could you please help me

    I don't have any idea about how to initialize the OCC??

    thank youu

  • Martin Dráb Profile Picture
    237,801 Most Valuable Professional on at

    Please give us more details about your situation. What are you doing? Installing a new environment? Synchronizing DB after imprting it from another environment. After installing a model? Or are you trying to automate some processes? Or what's the reason?

    Does synchronization through Visual Studio work?

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 660 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 549 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 307 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans