Friday, 27 November 2015

Import Model store AX 2012

During AX 2012 upgrade steps there is the step required to import model store. The AX upgrade guide given the steps but it could not work to me. For that I found other way on technet steps as below:

- Create a temporary schema
- Import model store to temporary schema
- Apply the model store


Import model store

Create a temporary schema
Create a temporary schema in AX database to be used on next step during import model store.

Steps:
1. Open SQL Server Management Studio
2. Connect to the SQL Server instance where AX database resides
3. Expand to Databases > MicrosoftDynamicsAX_model > Security > Schemas
4. Right click > New schema
5. Type in the temporary schema name (TempSchema) and select the schema owner and click "OK"
6. Initialize the temporary schema

Initialize-AXModelStore -AOSAccount "Domain\AccountName" -SchemaName <NewSchema> -Server <ServerName> -Database <DatabaseName>)


Import model store to temporary schema
Syntax: Import-AXModelStore -File <filename> -SchemaName 

Example:
Import-AXModelStore -File “C:\AX_Model_and_ModelStore_Backup-Export\AXModels_11-9\AXModelStore.axmodelstore” -SchemaName “TempSchema” –IdConflict overwrite



This will take a long time (might be 2+ hours)


Apply the model store

Example: Import-AXModelStore -Apply:TempSchema  





Restrat AOS, compile and synchronize application


This helped you..!! Then comment below..:)

Thursday, 26 November 2015

Preserve legacy Id while AX 2012 upgrade

Preserve legacy element IDs is one of the step in code upgrade checklist in place

this workout is only in the case mention below.

When the environment have separate AOS and SQL (Database) Servers then it’s complex to handle Preserve legacy Id. it tricky to handle

Go through the trick below:

When you are ready to perform the Preserve legacy element IDs task, stop the target system AOS

  • Create or identify a temporary file share on the SQL server. And assign rights to “Network service” or the user with AOS service is running
  • Copy the file SysUpgradeExportIdMap.csv to the file share on the SQL server on the above created folder
  • Retrieve the file DatabaseUpgrade\XPO\MicrosoftElementsRenamed62.csv from the installation media, and copy it to the same location on the SQL server
  • Open a Microsoft Dynamics AX 2012 Management Shell window, and execute the following command
  • While running the below command it will generate IdDataFormat.xml and RenameDataFormat.xml on the path c:\. Copy both file and paste to SQL server on the same path “c:\”
  • Run the command on “c:\” not to c:\windows\system32
axutil idkeep /idfile:\\TEST-DB\ElementIdLegacyid\SysUpgradeExportIdMap.csv /renamefile:\\TEST-DB\ElementIdLegacyid\MicrosoftElementsRenamed62.csv /verbose

(:\\TEST-DB\ElementIdLegacyid\) is the shared path on DB server



This helped you..!! Then hit the ads on the page..:)