在Domain Controller上安装all-in-one AX 2012 R2 Retail开发环境 -2
问题描述
碰到另外的一个问题是Sync Service (dbservers.exe)的运行帐户。开始时候没有仔细读安装说明, 按照通常习惯假定bcproxy帐户应该可以没问题,但是在Test AOS Profile的时候还是碰到了错误:
错误消息:
“unable to connect to an Application Object Server. A company name or server name may not be specified correctly in the client configuration or the server specified may not be available”
call stack如下:
我当前登录到AX client的帐户是administrator,怎么可能没办法登录到AX系统呢?
分析研究
当我们对AOS Profile进行test connection时候,根据AOS Profile对应的Commerce Data Exchange: Sync Service Profile找到对应的SyncService地址发送Socket请求到对应DBServer.exe,DBServer.exe会使用这里的AOS Connection string通过调用BC.NET的LogOn来连接对应的AOS 。根据上面的call stack, 没有使用LogonAs系列函数. 所以我们test connection是使用DBServer.exe的process identity来登录AOS的,跟当前AX32.exe的登录帐户无关! - 这解释了为什么即使是当前AX client登录帐户是Administrator仍然无法成功。
进一步我们看到安装说明上对Sync Service 帐户的需求:
https://technet.microsoft.com/en-us/library/dd362055.aspx
“Create Account for Retail Services
Description
The accounts that the Synch Service Windows service runs as. These accounts are used to communicate with the database server.
Consider the following points when you select an account:
Guest or temporary user accounts are not supported.
The service user account on head-office instances of Synch Service must be a Microsoft Dynamics AX user.
If you are installing a forwarder instance of Synch Service at headquarters, the service user account can be any valid domain account.
If you are installing an instance of Synch Service for a channel, you can use a valid local user account on the computer where the instance runs.
The account must be a member of the db_datareader and db_datawriter database roles in the message database.
This account must be created on POS computers where offline databases are located.
Enter this account when you run the Setup wizard to install Synch Service. For more information, see Install Commerce Data Exchange: Synch
“
最后的解决方案:
因为我们是在做All-In-One 安装,所以这个Sync Service帐号应该是个AX User用户,有权力直接登录AX读写AX的数据。而通常BC.NET帐号我们是不建议添加为AX User帐户的。
至此问题得以解决。
thanks
Cliff