As i was loading ax license file,i came across the above error.This error was occurring when tables were being synchronized.
I there figured out that this was a synchronization issue......
I therefore run the below job which helped me to identify the tables which could not be synchronized.
.....//Job
static void forceDbSynchronize(Args _args)
{
Dictionary dict;
int idx, lastIdx, totalTables;
TableId tableId;
Application application;
SysOperationProgress progress;
StackBase errorStack;
ErrorTxt errorTxt;
;
application = new Application();
dict = new Dictionary();
totalTables = dict.tableCnt();
progress = new SysOperationProgress();
progress.setTotal(totalTables);
progress.setCaption("@SYS90206");
errorStack = new StackBase(Types::String);
lastIdx = 0;
try
{
for (idx = lastIdx+1; idx <= totalTables; idx++)
{
tableId = dict.tableCnt2Id(idx);
progress.setText(dict.tableName(tableId));
lastIdx = idx;
application.dbSynchronize(tableId, false, true, false);
progress.incCount();
}
}
catch (Exception::Error)
{
errorTxt = strFmt("Error in table '%1' (%2)", tableId, dict.tableName(tableId));
errorStack.push(errorTxt);
retry;
}
setPrefix("@SYS86407");
errorTxt = errorStack.pop();
while (errorTxt)
{
error(errorTxt);
errorTxt = errorStack.pop();
}
}
This job will help you identify the tables but it wont resolve the issue::
Solution:
I therefore employed a trick though it came after trying so many options...
This is how you go about this issue,
- Identify tables using the above code
- Go the the AX database in sql server management studio
- Rename all those table as old example " abc.old"
- After renaming all those tables, go back into ax AOT then try to synchronize specific tables one by one.
- Note,some tables will synchronize others will give you an error-dont worry of this.
- After the above process,go back to the sql management studio then to your database
- You will notice new tables have been created with the names similar to those names you changed(without .old).
- Now,delete all those tables,then RENAME the tables you changed earlier back to there original names.
- After this process,now go back to AX(Administartion-periodic-sql administration-All tables-check/synchronize)
- This will resolve your issue..
Thanks and keep reading for me ...