Issues while updating Dynamics 365 SCM to 10.0.38
In this article I would mention the issues faced during version update to 10.0.38 of Dynamics 365 Supply Chain Management.
Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt
DECLARE @KernelTables TABLE (
TableName NVARCHAR(200),
TableNumber Int);
DECLARE @ResultKernelTables TABLE (
TableNumber Int);
-- List of all Kernel Tables, with a unique TableNumber
INSERT INTO @KernelTables(TableName, TableNumber) VALUES('SQLDICTIONARY',1)
INSERT INTO @KernelTables(TableName, TableNumber) VALUES('SYSCONFIG',2)
INSERT INTO @KernelTables(TableName, TableNumber) VALUES('USERINFO',3)
INSERT INTO @KernelTables(TableName, TableNumber) VALUES('SECURITYROLE',4)
INSERT INTO @KernelTables(TableName, TableNumber) VALUES('DATABASELOG',5)
INSERT INTO @KernelTables(TableName, TableNumber) VALUES('AOSDUPLICATEKEYEXCEPTIONMESSAGE',6)
INSERT INTO @KernelTables(TableName, TableNumber) VALUES('TIMEZONESLIST',7)
INSERT INTO @KernelTables(TableName, TableNumber) VALUES('TIMEZONESRULESDATA',8)
-- get the KernelTable names
DECLARE KernelTableName_cursor CURSOR LOCAL FOR
SELECT TableName, TableNumber
FROM @KernelTables
-- (-1) : Exception happened
-- 0 : Dropped no column
-- 1 : Dropped atleast one Kernel Table column
DECLARE @Result INT = 0;
DECLARE @KernelTableName NVARCHAR(200);
DECLARE @KernelTableNumber INT;
DECLARE @SqlCmd NVARCHAR(500);
BEGIN TRY
BEGIN TRANSACTION T1
OPEN KernelTableName_cursor;
FETCH NEXT FROM KernelTableName_cursor INTO @KernelTableName, @KernelTableNumber;
WHILE @@FETCH_STATUS = 0
BEGIN
IF COL_LENGTH(@KernelTableName, 'SYSROWVERSIONNUMBER') IS NOT NULL
BEGIN
SET @SqlCmd = 'ALTER TABLE dbo.' + @KernelTableName + ' DROP COLUMN SYSROWVERSIONNUMBER';
EXEC sp_executesql @SqlCmd;
SET @Result = 1;
INSERT INTO @ResultKernelTables(TableNumber) VALUES(@KernelTableNumber);
END
FETCH NEXT FROM KernelTableName_cursor INTO @KernelTableName, @KernelTableNumber;
END
COMMIT TRANSACTION T1
SELECT @Result AS Result, TableNumber AS KernelTableNumber, 0 AS Error, '' AS ErrorMessage
FROM @ResultKernelTables;
END TRY
BEGIN CATCH
SELECT -1 AS Result, -1 AS KernelTableNumber, ERROR_NUMBER() as Error, ERROR_MESSAGE() as ErrorMessage
ROLLBACK TRANSACTION T1
END CATCH
The source of the script is the dynamics community post at https://community.dynamics.com/forums/thread/details/?threadid=5ac5498d-b0b6-ee11-a569-002248244c88
3. After the update is finished , you may get issues while creating sales order lines if you are using Retail functionality.
Method not found: 'Void Microsoft.Dynamics.Commerce.Runtime.Services.PricingEngine.PriceAndDiscountCalculationParameters.set_TransactionTotaling(Microsoft.Dynamics.Commerce.Runtime.Services.PricingEngine.IPricingTransactionTotalingHelper)'.
Microsoft.Dynamics.Commerce.Runtime.Services.PricingEngine
领英推荐
Method not found: Boolean Microsoft.Dynamics.Commerce.Runtime.DataModel.UnifiedPricingParameter.get_ShouldUseAttributeBasedPricing()
These issues can be fixed by deleting the following dlls from K:\AosService\WebRoot\bin
Microsoft.Dynamics.Commerce.Runtime.Services.PricingEngine.dll
Microsoft.Dynamics.Commerce.Runtime.Entities.dll
TIP : I use D365fo tools to quickly go to find out the issue during update. The script that I use is
Get-D365Runbook -Latest | Invoke-D365RunbookAnalyzer | Out-File "C:\Temp\runbook-analyze-results.xml"
Running this Powershell script generates an xml file which can easily point the error on a runbook step.
Microsoft Dynamics 365 Technical Consultant @ Synoptek, India | Microsoft Certified D365 F&SCM Developer | MS AX Technical | MS Dynamics 365 Finance & Operations | Content Writer
1 年Really helpful ??