I am facing following error while running the "Configure Partitions" under the Prepare for Upgrade checklist .The details of the error are given below:
Request for the permission of type 'SqlStatementExecutePermission' failed.(S)\Classes\SqlStatementExecutePermission\demand(S)\Classes\Statement\executeUpdate(C)\Classes\ReleaseUpdatePartitionsMappingDatabase\createDefaultPartition - line 50(C)\Classes\ReleaseUpdatePartitionsMappingDatabase\initPartitions - line 8(C)\Classes\ReleaseUpdatePartitionsMappingDatabase\initMappings - line 8(C)\Classes\ReleaseUpdatePartitionsMapping\initMappings - line 4(C)\Forms\DEL_ReleaseUpdatePartitionsMapping\Methods\init(C)\Classes\SysSetupFormRun\init - line 3(C)\Classes\MenuFunction\run(C)\Classes\SysHelp\processMenuFunction - line 85(C)\Classes\SysHelp\processStandardLink - line 18(C)\Classes\SysHelp\processOnEventNavigate - line 40(C)\Classes\SysHelp\onEvent_BeforeNavigate2 - line 27(C)\Classes\FormActiveXControl\onEvent_BeforeNavigate2
We have seen this happen a few times, but still haven't figured out what is making it happen yet. The problem is that somehow the XPO that is imported gets the RunOn property set incorrectly on the ReleaseUpdatePartitionsMappingDatabase class - it should be set to RunOn Server. We have tried importing in an XPO again, and that has worked in some cases but not others. In other cases we have had the customer/partner simply take the SQL code that is within the ReleaseUpdatePartitionsMappingDatabase class methods and execute them directly in SQL Management Studio rather than using the class.
Once the data gets created in the table, you can open the form and change the partitions per company if that is something you need to do.
Not related to your problem but to mention it, there is also a little "bug" in this createDefaultPartition method.
When creating the SystemSequences record for the DEL_ReleaseUpdatePartitions table, it creates the record by initializing the dataAreaId field with the curext() value instead of the fixed "dat" company.
This can cause problems in the later steps of the dataupgrade (especially in the state transfer tool) if you have run the method on another company.
Can you suggest me the code or steps to be executed in the SQL Management Studio, i tried to get the code from the ReleaseUpdatePartitionsMappingDatabase class and execute it in the SQL Management Studio but got no luck? I am a new in AX Development, so please help me to figure out the issue of Partitions mapping
You could execute the following code in SQL Management Studio to create the rows - thanks Nicolas also for the note about the curExt() that we are using, I will try and get that changed moving forward. If you want a different language for the partition name 'Initial Partition' you will have to look up the label @UPG4632 and pick the language you want.
declare @tabID int;
set @tabID = (select TABLEID from SQLDICTIONARY where NAME = 'DEL_ReleaseUpdatePartitions')
insert into DEL_RELEASEUPDATEPARTITIONS (PARTITIONKEY,NAME,RECVERSION,RECID)
values ('Initial','Initial Partition',1,5637144576)
insert into SYSTEMSEQUENCES (ID,NEXTVAL,MINVAL,MAXVAL,NAME,TABID,DATAAREAID,RECVERSION,RECID)
values (-1,5637144577,1, 0xffffffffffffffff,'SEQNO',@tabID,'DAT',1,-1)
The sql code works perfectly!!!