29.11.2007, 00:53 | #1 |
Участник
|
gatesasbait: On data dictionary synchronization errors
Источник: http://gatesasbait.spaces.live.com/B...B9F5!141.entry
============== Good afternoon, Today, I'll describe some of the more common causes of Data Dictionary Synchronization failures, how to diagnose them and how to fix them. Most of this post should be applicable from Ax 2.5 all the way up to DAX 5.0. Dictionary overview Every object related to the SQL Database (tables, table fields, table indexes) is identified by 'name' in the Database, but identified by a 'unique id' in Dynamics Ax. This unique id is kept in code, in its respective layer file (*.aod). This unique id is a constant; SalesTable for example has had the table id '366' since forever. The object id found in the layer is matched with the Database object name through a table called 'SQLDictionary'. This table maps DAX table ids to SQL table names, and DAX field ids to SQL field names. This means that in theory and practice, a field could have a certain name under DAX, and a different name under the SQL Databse; this happens for example when the object name under the DAX AOT is longer than 30 characters. During synchronization of the dictionnary under the DAX AOT, DAX looks through the SQLDictionary table and verifies that all tables and fields can be found, that they have the proper id and that the corresponding SQL object exists with the proper name and proper type. Possible scenarios at synchronization
Sometimes, DAX will fail to synchronize a table and give you an error message that does not identify the problematic table. This job will help you determine where the cause of the error is: static void manualSync(Args _args) { #define.unknown("UNKNOWN") #define.tableIdMax(65536) int i = 1; ; while (i < #tableIdMax) { if (tableid2name(i) != #unknown) { print(tableid2name(i)); try { if (!appl.dbSynchronize(i, false, true)) throw Exception::Error; } catch { error(tableid2name(i)); } } i++; } } more to come (such as code examples to fix SQLDictionary) ... Источник: http://gatesasbait.spaces.live.com/B...B9F5!141.entry
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
|