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.
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.
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 username@azureserverid, for example, navadmin@z8bdostg9d.
Parameter properties
Type:
PSCredential
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
DirectSQL
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
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'.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
DirectSQL
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-ApplicationDatabaseServer
Specifies the name of the computer on which the SQL Server instance for the application database is installed.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
DirectSQL
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Force
Forces the command to run without asking for user confirmation about the data in the provided sandbox database being overwritten.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
DirectSQL
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
SandboxDB
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-IdePath
Specifies the path to the Dynamics NAV IDE executable (finsql.exe).
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Name
Specifies the name of the NAV App to be repaired.
The search must return only a single NAV App to successfully repair.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
20
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-Publisher
Specifies the publisher of the NAV App to be repaired.
The results must return only a single NAV App to successfully repair.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
21
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
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.
Parameter properties
Type:
PSCredential
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
DirectSQL
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
SandboxDB
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
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.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
DirectSQL
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-SandboxDatabaseServer
Specifies the name of the computer on which the SQL Server instance for the sandbox database is installed.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
DirectSQL
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
SandboxDB
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-ServerInstance
Specifies the Microsoft Dynamics NAV Server instance for which the NAV App should be repaired, such as DynamicsNAV.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
0
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
True
Value from remaining arguments:
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.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
DirectSQL
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
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.
Parameter properties
Type:
UInt32
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
DirectSQL
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
SandboxDB
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Version
Specifies the version of the NAV App to be repaired.
The results must return only a single NAV App to successfully repair.
Parameter properties
Type:
Version
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
22
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.