Repair-NAVApp

Repairs a NAV App by recompiling it against the current base application. Use this cmdlet if the base application has changed since publishing the NAV App. It is recommended that the NAV Server instance is restarted after running the repair.

Syntax

Repair-NAVApp
      [-ServerInstance] <String>
      [-Name] <String>
      [[-Publisher] <String>]
      [[-Version] <Version>]
      [-IdePath <String>]
      [<CommonParameters>]
Repair-NAVApp
      [-ServerInstance] <String>
      [-Name] <String>
      [[-Publisher] <String>]
      [[-Version] <Version>]
      [-IdePath <String>]
      -ApplicationDatabaseName <String>
      [-ApplicationDatabaseServer <String>]
      [-ApplicationDatabaseCredentials <PSCredential>]
      [-ServiceAccount <String>]
      [-SandboxDatabaseName <String>]
      [-SandboxDatabaseServer <String>]
      [-SandboxDatabaseCredentials <PSCredential>]
      [-SqlTimeout <UInt32>]
      [-Force]
      [<CommonParameters>]
Repair-NAVApp
      [-ServerInstance] <String>
      [-Name] <String>
      [[-Publisher] <String>]
      [[-Version] <Version>]
      [-IdePath <String>]
      -SandboxDatabaseName <String>
      [-SandboxDatabaseServer <String>]
      [-SandboxDatabaseCredentials <PSCredential>]
      [-SqlTimeout <UInt32>]
      [-Force]
      [<CommonParameters>]

Description

Use the Repair-NAVApp cmdlet to recompile a NAV App that has been published in the app catalog of the specified Microsoft Dynamics NAV Server instance.

If you have deployed your NAV database to Azure SQL Database, you will need to create a new database to use as the sandbox for completing the publishing process. Use the SandboxDatabaseName, SandboxDatabaseServer, and SandboxDatabaseCredentials parameters to specify the connection information for the database to use as the sandbox.

Examples

EXAMPLE 1

Repair-NAVApp -ServerInstance DynamicsNAV90 -Name 'Proseware SmartApp' -Version 2.3.4.500

This example repairs the NAV App with a name of Proseware SmartApp and version of 2.3.4.500.

EXAMPLE 2

Get-NAVAppInfo -ServerInstance DynamicsNAV90 | Repair-NAVApp

This example repairs all of the NAV Apps in the DynamicsNAV90 server instance's app catalog.

Parameters

-ApplicationDatabaseCredentials

Specifies the user name and password of a SQL Server Authentication login account that provides access to the application database in SQL Server. You use this parameter to access the database by using SQL Server Authentication. If you want to use Windows Authentication, then you can omit this parameter.The login account must be a member of the db_owner role on the database. If the sandbox database is an Azure SQL Database, the user name must follow the pattern @, e.g. navadmin@z8bdostg9d.

Type:PSCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ApplicationDatabaseName

The name of an existing NAV SQL database that you want to use as the Application for completing the publishing process, such as 'DynamicsNAV_App'.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ApplicationDatabaseServer

Specifies the name of the computer on which the SQL Server instance for the application database is installed.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Force

Forces the command to run without asking for user confirmation about the data in the provided sandbox database being overwritten.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-IdePath

Specifies the path to the Dynamics NAV IDE executable (finsql.exe).

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Specifies the name of the NAV App to be repaired.

The search must return only a single NAV App to successfully repair.

Type:String
Position:20
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Publisher

Specifies the publisher of the NAV App to be repaired.

The results must return only a single NAV App to successfully repair.

Type:String
Position:21
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-SandboxDatabaseCredentials

Specifies the user name and password of a SQL Server Authentication login account that provides access to the sandbox database in SQL Server. You use this parameter to access the database by using SQL Server Authentication.

If you want to use Windows Authentication, then you can omit this parameter.

The login account must be a member of the db_owner role on the database.

For sandboxes hosted on Azure SQL, the user name must follow the pattern <username>@<azureserverid>, e.g. navadmin@z8bdostg9d.

Type:PSCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SandboxDatabaseName

The name of the Azure SQL Database that you want to use as a sandbox for completing the publishing process, such as 'DynamicsNAV_Sandbox'. This must be used if publishing to a NAV Server instance that is deployed to Azure SQL Database. The current content of the sandbox database will be overwritten.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SandboxDatabaseServer

Specifies the name of the computer on which the SQL Server instance for the sandbox database is installed.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ServerInstance

Specifies the Microsoft Dynamics NAV Server instance for which the NAV App should be repaired, such as DynamicsNAV.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ServiceAccount

Specifies the name of the windows service account used by the server to access the NAV Application Database. Only needed when not supplying an existing sandbox database.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SqlTimeout

The time (in seconds) to wait before terminating an attempt to execute a command on SQL Server, such as reading content or restoring the database from a .bak file.

Type:UInt32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Version

Specifies the version of the NAV App to be repaired.

The results must return only a single NAV App to successfully repair.

Type:Version
Position:22
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False