Posts

Showing posts with the label SQL Script

Illegal data conversion from original field ProdParameters.PKA_BOMQtyEdit to ProdParameters.PKA_DisableNewDeletePickingList: unable to convert data types to anything but character field type (14 to 49)

Image
Hi Technical, Today, in this post we will talk about a very interesting topic about illegal data conversion from original field to newly created field. Here, we need to understand this error occur while DB synchronization. Error : Illegal data conversion from original field ProdParameters.PKA_BOMQtyEdit to ProdParameters.PKA_DisableNewDeletePickingList: unable to convert data types to anything but character field type (14 to 49) Note : PKA_BOMQtyEdit  and PKA_DisableNewDeletePickingList are ProdParameters table fields. Solution : Note : Please perform below action if you are DBA or having knowledge on SQL Queries in AX. Check the fields id in AOT and compare it with SQLDictionary table in SQL with the following query: --To Check: select * from SQLDICTIONARY where TABLEID in (select TABLEID from SQLDICTIONARY where name = 'ProdParameters') and NAME = 'PKA_BOMQtyEdit' select * from SQLDICTIONARY where TABLEID in (select TABLEID from SQLDICTION...

[Error] - Msg 3101, Level 16, State 1, Line 2 Exclusive access could not be obtained because the database is in use. Msg 3013, Level 16, State 1, Line 2 RESTORE DATABASE is terminating abnormally.

Hi Folks, Today, in this article we will talk about below error which generally cause when database is in use and you want to perform an operation on DB like DB restoration. Error : Msg 3101, Level 16, State 1, Line 2 Exclusive access could not be obtained because the database is in use. Msg 3013, Level 16, State 1, Line 2 RESTORE DATABASE is terminating abnormally. Solution : 1. Login to your SQL Server Management Studio (SSMS) using run as administrator. 2. Select the DB on which you want to perform the operation. 3. Click on 'New Query' button or press CTRL + N, a new window will open. 4. Copy the below script and run it. use master go alter database Your_DB_Name set single_user with rollback immediate go alter database Your_DB_Name set multi_user go 5. Now, try to perform the operation again. You should be able to perform it. Comment below if this article helped you... Author : Chirag Gupta Microsoft Dynamics 365 AX Technical Consultant at...

AX 2012 - SQL script to fetch Color, Size, Site and Location based on item id

Hi AX Technical, In this post, we will use SQL script/query to fetch Color, Size, Site and Location based on item id. --// How to fetch Color, Size, Site and Location based on item id --// SQL script written by Chirag Gupta select ITEMID, INVENTCOLORID, INVENTSIZEID, INVENTSITEID, INVENTLOCATIONID from INVENTDIMCOMBINATION   join INVENTDIM     on INVENTDIM.INVENTDIMID = INVENTDIMCOMBINATION.INVENTDIMID  where INVENTDIM.DATAAREAID = 'MGP' --// Change DataAreaId according to your need   order by ITEMID; Author: Chirag Gupta Microsoft Dynamics 365 AX Technical Consultant at IBM Bangalore Date: 3-Sep-2019 Happy Learning !!