Friday, 13 April 2018

Object Server Azure: Exception 3762504530 occurred in session 2, process: w3wp.exe, thread: 6396 (After restore Azure db to local VM)

Ref: https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/database/copy-database-from-azure-sql-to-sql-server

While trying to update local Dynamics 365 VM to use a database backup from Azure environment, I'm getting the error "Object Server Azure: Exception 3762504530 occurred in session 2, process: w3wp.exe, thread: 6396". This happens after I rename the database and start up the services again.

What happens is that the *.bacpac file has not been prepared for SQL Server yet, it is a direct backup of the Azure SQL database.

In ref. link above, one of the step is to prepare the database which include an important settings changes:

update sysglobalconfiguration set value = 'SQLSERVER' where name = 'BACKENDDB'

This statement will prepare the database for SQL Server environment.
To resolve this issue, run the script under the "Prepare the database" section (in the ref. link above), then restart the services again.

Before the error is resolved, if you're running the Admin user provisioning tool, you'll get "Time out has expired and the operation has not been completed" error.




Below is the screenshot from Event Viewer for the error in title

------------------------------------------------
The description for Event ID 180 from source Dynamics Server Azure cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event:

Object Server Azure:
Exception 3762504530 occurred in session 2,process: w3wp.exe ,thread: 6396


------------------------------------------------

Tuesday, 3 April 2018

Biztalk mapper and Functoid (columns to rows tranformation)

This article demo the use of Table Looping and Table Extractor functoid to transform columns to rows. The scenario is there's a source schema which has 3 dates fields. These dates needs to be transformed into rows in the destination schema. A date type field in the destination schema will indicate the purpose of the date (Eg. An enum value).

1. Create an Integration Account project


2. Add the source and destination schema
3. Add a new Map


4. Open the map and select the source and destination schema
5. Add a "Table Looping" functoid to the grid
6. Drag the parent node to the functoid to connect them


7. Double click on the "Table Looping" functoid in the grid and enter the number of columns to generate (In my example, 2)


8. Then drag all the date fields to the table looping functoid
    *Double click on it will shows the input as shown below.


9. In my scenario, I'll need date type, so I'll be adding in 3 constant value as the date type (POD, DLD, DCD)


10. Click on the "Table Looping Grid" in the screenshot above and set the rows, then click "OK" to close it


11. Drag a line from the "Table Looping" functoid to the parent node of the date


12. Drag 2x "Table Extractor" functoid to the grid
13. Drag a line from the "Table Looping" functoid to the first "Table Extractor" functoid. Then drag another line from the "Table Looping" functoid to the second "Table Extractor" functoid.
14. Drag a line from first "Table Extractor" functoid to the "DateType" field.
15. Drag a line from the second "Table Extractor" functoid to the "DateValue" field.
      It should now looks like the screenshot below.


16. Double click on the first "Table Extractor" functoid and set "1" as shown in screenshot below.
This value indicate the table extractor should extract the 1st column in the Table Looping output. In our example, it extract the first column from the Table Looping functoid and map it to DateType.
Do the same setup to the second "Table Extractor" functoid by setting it to "2" (which indicate it should extract the 2nd column from the Table Looping output, which eventually mapped to "DateValue")


17. Run a test on the map with a sample input XML as shown in the screenshot below


18. The output will be as shown in the screenshot below