Remove-NAVApplication
Remove-NAVApplication
Removes the tables that define the application from a Microsoft Dynamics NAV database. When you have removed the application tables from the database, you cannot import them again. Make sure that you have a full backup available.
Syntax
Parameter Set: Default
Remove-NAVApplication -DatabaseName <DatabaseName> [-DatabaseInstance <DatabaseInstance> ] [-DatabaseServer <DatabaseServer> ] [-Force] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
Use the Remove-NAVApplication cmdlet to delete the application tables from the specified Microsoft Dynamics NAV database. Use this cmdlet after you have extracted the application tables to a new application database by using the Export-NAVApplication cmdlet.
For example, if you are upgrading to the current version of Microsoft Dynamics NAV, you can use the Export-NAVApplication cmdlet and the Remove-NAVApplication cmdlet during the upgrade. Also, if you migrate to a multitenant deployment architecture, you can use the Export-NAVApplication cmdlet and the Remove-NAVApplication cmdlet when you set up the application and tenant databases.
Parameters
-DatabaseInstance<DatabaseInstance>
Specifies the name of the SQL Server instance where the Microsoft Dynamics NAV database is located. The default value is MSSQLSERVER
.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-DatabaseName<DatabaseName>
Specifies the name of the database that the application tables must be removed from.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-DatabaseServer<DatabaseServer>
Specifies the name of the computer that is running SQL Server. The default value is localhost
.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Force
Forces the command to run without asking for user confirmation.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Confirm
Prompts you for confirmation before running the cmdlet.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
- None
Outputs
The output type is the type of the objects that the cmdlet emits.
System.String ServerName
Returns the value of the DatabaseServer parameter.
System.String ServerInstance
Returns the value of the DatabaseInstance parameter.
System.String DatabaseName
Returns the value of the DatabaseName parameter.
Examples
--------------------------EXAMPLE 1--------------------------
Description
-----------
This example removes the application tables from the specified database on the local server.
PS C:\> Remove-NAVApplication -DatabaseName 'Demo Database NAV (8-0)'
--------------------------EXAMPLE 2--------------------------
Description
-----------
This example shows how to remove the application-wide tables from the demonstration database on the specified server and instance.
PS C:\> Remove-NAVApplication –DatabaseServer ‘MyServer’ –DatabaseInstance ‘NAVDemo’ –DatabaseName ‘Demo Database NAV (8-0)’
--------------------------EXAMPLE 3--------------------------
Description
-----------
This example shows how you can combine the Export-NAVApplication cmdlet and the Remove-NAVApplication cmdlet when you set up the application and tenant databases. The example extracts the application tables to a new database, NAV App
, and then removes the tables from the original database. Next, you mount the two databases against a Microsoft Dynamics NAV Server instance by using the Mount-NAVApplication cmdlet and the Mount-NAVTenant cmdlet.
PS C:\> Export-NAVApplication -DatabaseServer ‘MyServer’ -DatabaseInstance ‘NAVDEMO’ -DatabaseName ‘Demo Database NAV (8-0)’ -DestinationDatabaseName ‘NAV App’| Remove-NAVApplication -DatabaseName ‘Demo Database NAV (8-0)’ -Force