다음을 통해 공유


How to: Remove (Uninstall) a Model

Important

This content is archived and is not being updated. For the latest documentation, see Microsoft Dynamics 365 product documentation. For the latest release plans, see Dynamics 365 and Microsoft Power Platform release plans.

Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

You can remove a model from a model store. However, we recommend that you remove a model only if you want to permanently delete it.

You can use either Windows PowerShell cmdlets or the AXUtil command-line utility to perform this task.

Warning

Deletion of a model or layer may cause significant loss of business data, and also loss of metadata. When you run a command to delete a model, we recommend that you use the –Details or /verbose parameter to list the elements that may be deleted. In this way, you can determine the effect of the deletion on your environment.

  • Business data may be lost if the database schema is changed. The database schema is changed when tables or fields are removed.

  • Element IDs may be lost. If element IDs are lost, existing business data may become invalid.

  • Orphaned metadata elements in other models or layers are deleted.

If you want to upgrade a model or replace a model with a newer version, we recommend that you import the model over the existing model. For more information about how to import models, see How to: Export and Import a Model. We recommend this approach, because element IDs and element handles are assigned at installation. Therefore, if you delete a model, and then reimport that model or a newer version of it, element IDs and element handles are randomized, and data integrity can be affected. For more information about element IDs and element handles, see Maintaining Installation-Specific Element IDs and Element Handles.

Validate permissions

  • Validate that you have appropriate permissions to work with the model store:

    • Administrative permissions on the local computer

    • System Administrator rights in Microsoft Dynamics AX

    • In Microsoft SQL Server:

      • Membership in the Securityadmin server role on the SQL Server instance

      • Membership in the db_owner role in the Microsoft Dynamics AX database

Uninstall a model (Windows PowerShell)

  1. On the Start menu, point to All Programs, point to Administrative Tools, and then click Microsoft Dynamics AX Management Shell.

  2. At the Windows PowerShell command prompt, PS C:\>, type the following command, and then press ENTER.

    Uninstall-AXModel -Model <Modelname>
    

    This command uninstalls the specified model. By default, a confirmation request is displayed.

    For more information, see Uninstall-AXModel.

Uninstall a model (AXUtil)

  1. On the Start menu, click Command prompt.

  2. Navigate to the directory for the management utilities. Typically, the location of this directory is %ProgramFiles%\Microsoft Dynamics AX\60\ManagementUtilities.

  3. At the command prompt, type the following command, and then press ENTER.

    axutil delete /model:<name>
    

    This command uninstalls the specified model. By default, a confirmation request is displayed.

See also

Models, Layers, and the Model Store

AxUtil and Windows PowerShell Commands for Deploying Models

Administering Microsoft Dynamics AX by using Windows PowerShell

Windows PowerShell for Microsoft Dynamics AX

Announcements: New book: "Inside Microsoft Dynamics AX 2012 R3" now available. Get your copy at the MS Press Store.