AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 03.07.2012, 00:12   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
emeadaxsupport: AX2012 AIF services error - The maximum number of joins allowed (99) is exceeded in the statement.
Источник: http://blogs.msdn.com/b/axsupport/ar...statement.aspx
==============

I recently came across an error which was causing a custom AIF service to fail in AX2012. When trying to execute a read on the service it was failing with an exception in the AIF exceptions form which contained the following text:

Stack trace: The maximum number of joins allowed (99) is exceeded in the statement.

The service query only contained 8 tables, so why it was hitting over 99 joins was a mystery.

Debugging the service cal in X++, we found that this was happening because in the service Axd class the method expandSurrogateForeignKeys() was set to return true. This meant that the query was expanded to cover all the surrogate foregin keys - it was reaching out to all the possible related tables for every table in the query.

The limit of 99 joins is the upper kernel limit, it cannot be exceeded. Setting a limit of 0 (in the server configuration form in AX client) will mean that 99 is used.

If you hit the same error in a different, non-AIF service, place it's worth thinking about table hierarchies, as if you're using tables in your query where they are part of a hierarchy then your query may contain more tables than you expect (to cover the reqired related tables in the hierarchy).




Источник: http://blogs.msdn.com/b/axsupport/ar...statement.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
Старый 03.07.2012, 08:13   #2  
S.Kuskov is offline
S.Kuskov
Участник
Лучший по профессии 2017
Лучший по профессии 2015
Лучший по профессии 2014
 
3,427 / 1771 (66) ++++++++
Регистрация: 28.04.2007
Адрес: Калуга
Чего-то я не понял как это 8 таблиц сгенерили 99 джойнов? Что делает expandSurrogateForeignKeys()? Заменяет все искуственные ключи на естественные? Т.е. у автора было больше 99 вторичных ключей в 8 таблицах? Получается, что не только в 8 таблицах, а ещё и во всех их наследованиках. Так что ли?

Т.е. считается, что все наследники таблицы всегда участвуют в запросе, если участвует родитель? Или это только expandSurrogateForeignKeys() так считает?
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
AIF: Microsoft Dynamics AX 2012 Services and AIF White Papers Blog bot DAX Blogs 0 16.06.2011 00:11
daxdilip: How to: Configure Dynamics AX AIF Services to listen for SSL Requests (https) Blog bot DAX Blogs 0 23.01.2011 10:12
emeadaxsupport: When using AX 2009 AIF Web Services errors may not always get propagated Blog bot DAX Blogs 0 09.11.2010 19:04
emeadaxsupport: Error when trying to register the AIF services - "Cannot create a record in Data Policy Schema Information (AifDocumentField)" Blog bot DAX Blogs 0 29.03.2010 21:05
emeadaxsupport: What changes are required if we change the Business Connector Proxy used by AX 2009 Generated AIF Web services Blog bot DAX Blogs 0 29.03.2010 15:05
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 02:28.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.