AXForum  
Go Back   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Forgotten Your Password?
Register Forum Rules FAQ Members List Today's Posts Search Mark Forums Read

 
 
Thread Tools Search this Thread Display Modes
Old 03.03.2017, 02:17   #1  
Blog bot is offline
Blog bot
Участник
 
25,644 / 848 (80) +++++++
Join Date: 28.10.2006
stoneridgesoftware: Moving Code Using Dynamics AX Temp Schema
Источник: https://stoneridgesoftware.com/movin...x-temp-schema/
==============

The reason for moving code using Dynamics AX temp schema is because you do not have a large window for downtime. By using this method, you would eliminate the time you would normally take to import a modelstore. Check out this article for more information on, How to: Create, Drop, or Reinitialize a Model Store [AX 2012].

This is how you would use Temp Schema for Dynamics AX:

In your TARGET environment where you would like the TempSchema created, do the following steps:

Note: You must first drain the target AOS before creating a new schema.

1. In Management util, run the command to create a new schema called TempSchema:

Axutil schema /schemaname:TempSchema

OR

Initialize-AXModelStore -SchemaName

This will create a new schema against the database defined in your current active AX server configuration. Refer to this link for details https://technet.microsoft.com/en-us/.../hh433540.aspx

For example, my current active AX server configuration is pointing to MicrosoftDynamicsAX database. So my AX model db is MicrosoftDynamicsAX_Model



This is what the schema looks like before I ran the above axutil schema command – note: TempSchema does not exist.



This is the command I ran to create the new schema called TempSchema:



When finished you will see the message ‘Model store schema successfully created.”



And in SQL management studio, on the MicrosoftDynamicsAX_model > Schemas, you will now see the new schema called TempSchema.







2. Next import the modelstorefile (this is the modelstore file you exported from the server with the changed/updated AX code) to the temporay schema.

You would do this on your TARGET environment at the same time when you are importing your modelstore to your TEST environment.

So, in management utilities on the AOS server of your Target environment run this command:

axutil importstore /file:modelstorefile.axmodelstore /schemaname:TempSchema /verbose

Or

Import-AXModelStore -File modelstorefile.axmodelstore -SchemaName TempSchema

NOTE:
The model store that you import to the non-default schema is not visible to Microsoft Dynamics AX.

This will cause the model db at the target to increase in size. So make sure you have enough disk space.

This is what I did as a test –



My model db size was around 8GB. After the importstore, the size was 14GB. Model log file size increased by about 3GB. These sizes may be different on your environment depending of how much code you have.

3. When you are ready to make the code in the TempSchema visible to AX (ie. Move to the dbo schema), you would do the following:

a. Drain the AOS, have all users logout of AX.
b. Shut down the AOSs and other services used by your Dynamics AX like Management reporter.
c. Clear the content in server\xppil folder for all the AOSs (:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\bin\XppIL)
d. When steps above are completed, run the following command in axutil –

axutil importstore /apply:TempSchema /verbose

OR

Import-AXModelStore -Apply:TempSchema

This is what I did as a test –



It completed in about 5 seconds.



In SQL management studio, if you now look at the tables under the AX_model database, you will notice the tempSchema.tablenames are no longer there. Only dbo.tablesnames exist now. Same as in programmability node in the AX_model database. TempSchema still exist as a schema under AX_Model> Security> Schema.



e. Start up 1 AOS, run synchronize
f. When synchronize is completed, deploy reports etc (follow the normal process you would do for moving code from one environment to another using the import modelstore method).

4. You may use the following commands to remove the temporary or nondbo schema:

axutil schema /drop:TempSchema

Or

Initialize-AXModelStore –Drop TempSchema



Источник: https://stoneridgesoftware.com/movin...x-temp-schema/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Similar Threads
Thread Thread Starter Forum Replies Last Post
NAV Team: Upgrading from Microsoft Dynamics NAV 2009 R2 or Microsoft Dynamics NAV 2009 SP1 to Microsoft Dynamics NAV 2015 Blog bot Dynamics CRM: Blogs 0 23.02.2015 13:00
rumicrosofterp: Dynamics AX на Convergence 2012 Blog bot Microsoft и системы Microsoft Dynamics 0 13.01.2012 11:11
Platform updates overview - 3.70.B - NAV2009 R2 Blog bot Dynamics CRM: Blogs 0 07.02.2011 22:06
dynamics-ax: Official Details about Dynamics AX '6' released, including comments from Microsofts Kees Hertogh Blog bot DAX Blogs 0 11.01.2011 05:22
Developer for Microsoft Dynamics AX Certification Roadmap Blog bot DAX Blogs 1 13.05.2009 16:17
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Рейтинг@Mail.ru
All times are GMT +3. The time now is 15:40.
Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Contacts E-mail, Advertising.