Error while upgrading service upgrade in On-premise environment in D365
usually this error occurs while upgrading between version 10.0.28 and 10.0.30.. may be appear in future as well
It's not a proper solution, but this workaround helped me...
usually this error occurs at step 57 or step 60.
1. I did manually create table AX.GUPItemBasePrice table in AXDB
(Needed to create this table because upgrade package had removed the "AX" schema and all tables were with "DBO" schema. upgrade package is looking for table in "AX" schema. Got to know from Error Logs)
USE [AXDB]
GO
/****** Object: Table [ax].[GUPITEMBASEPRICE] Script Date: 11/15/2022 12:41:45 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [ax].[GUPITEMBASEPRICE](
[RECID] [bigint] NOT NULL,
[ACTIVATIONDATE] [date] NOT NULL,
[INVENTDIMID] [nvarchar](20) NOT NULL,
[ITEMID] [nvarchar](100) NOT NULL,
[MARKUP] [numeric](32, 16) NOT NULL,
[MARKUPQTY] [numeric](32, 16) NOT NULL,
[PRICE] [numeric](32, 16) NOT NULL,
[PRICEALLOCATEMARKUP] [int] NOT NULL,
[PRICEQTY] [numeric](32, 16) NOT NULL,
[PRICETYPE] [int] NOT NULL,
[UNITID] [nvarchar](10) NOT NULL,
[FROMDATE] [date] NOT NULL,
[TODATE] [date] NOT NULL,
[CREATEDDATETIME] [datetime] NOT NULL,
[DATAAREAID] [nvarchar](4) NOT NULL,
[ROWVERSION] [timestamp] NOT NULL,
CONSTRAINT [I_GUPITEMBASEPRICE_RECID] PRIMARY KEY CLUSTERED
(
[RECID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY],
CONSTRAINT [I_-1063074925_1429128816] UNIQUE NONCLUSTERED
(
[ITEMID] ASC,
[INVENTDIMID] ASC,
[PRICETYPE] ASC,
[FROMDATE] ASC,
[TODATE] ASC,
[CREATEDDATETIME] ASC,
[DATAAREAID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [ax].[GUPITEMBASEPRICE] ADD CONSTRAINT [DF_GUPITEMBASEPRICE_ACTIVATIONDATE] DEFAULT ('1900-01-01') FOR [ACTIVATIONDATE]
GO
ALTER TABLE [ax].[GUPITEMBASEPRICE] ADD CONSTRAINT [DF_GUPITEMBASEPRICE_INVENTDIMID] DEFAULT ('') FOR [INVENTDIMID]
GO
ALTER TABLE [ax].[GUPITEMBASEPRICE] ADD CONSTRAINT [DF_GUPITEMBASEPRICE_ITEMID] DEFAULT ('') FOR [ITEMID]
GO
ALTER TABLE [ax].[GUPITEMBASEPRICE] ADD CONSTRAINT [DF_GUPITEMBASEPRICE_MARKUP] DEFAULT ((0)) FOR [MARKUP]
GO
ALTER TABLE [ax].[GUPITEMBASEPRICE] ADD CONSTRAINT [DF_GUPITEMBASEPRICE_MARKUPQTY] DEFAULT ((0)) FOR [MARKUPQTY]
GO
ALTER TABLE [ax].[GUPITEMBASEPRICE] ADD CONSTRAINT [DF_GUPITEMBASEPRICE_PRICE] DEFAULT ((0)) FOR [PRICE]
GO
ALTER TABLE [ax].[GUPITEMBASEPRICE] ADD CONSTRAINT [DF_GUPITEMBASEPRICE_PRICEALLOCATEMARKUP] DEFAULT ((0)) FOR [PRICEALLOCATEMARKUP]
GO
ALTER TABLE [ax].[GUPITEMBASEPRICE] ADD CONSTRAINT [DF_GUPITEMBASEPRICE_PRICEQTY] DEFAULT ((0)) FOR [PRICEQTY]
GO
ALTER TABLE [ax].[GUPITEMBASEPRICE] ADD CONSTRAINT [DF_GUPITEMBASEPRICE_PRICETYPE] DEFAULT ((0)) FOR [PRICETYPE]
GO
ALTER TABLE [ax].[GUPITEMBASEPRICE] ADD CONSTRAINT [DF_GUPITEMBASEPRICE_UNITID] DEFAULT ('') FOR [UNITID]
GO
ALTER TABLE [ax].[GUPITEMBASEPRICE] ADD CONSTRAINT [DF_GUPITEMBASEPRICE_FROMDATE] DEFAULT ('1900-01-01') FOR [FROMDATE]
GO
ALTER TABLE [ax].[GUPITEMBASEPRICE] ADD CONSTRAINT [DF_GUPITEMBASEPRICE_TODATE] DEFAULT ('1900-01-01') FOR [TODATE]
GO
ALTER TABLE [ax].[GUPITEMBASEPRICE] ADD CONSTRAINT [DF_GUPITEMBASEPRICE_CREATEDDATETIME] DEFAULT (getutcdate()) FOR [CREATEDDATETIME]
GO
ALTER TABLE [ax].[GUPITEMBASEPRICE] ADD CONSTRAINT [DF_GUPITEMBASEPRICE_DATAAREAID] DEFAULT ('dat') FOR [DATAAREAID]
GO
2. Removed all Roles from AXDB (Whichever is allowing to delete)
3. Removed all schemas from AXDB (Whichever is allowing to delete)
4. Execute below query in AXDB
DROP VIEW __RETAIL_PENDING_DEPLOYMENT
5. re-execute the step with below command
AXUpdateInstaller.exe execute -runbookid="Dev-runbook14112022" -rerunstep=60
No comments:
Post a Comment