Share via


Remove-NAVApplication

Removes the tables that define the application from a Business Central 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

Default (Default)

Remove-NAVApplication
    [-DatabaseServer <DatabaseServer>]
    [-DatabaseInstance <DatabaseInstance>]
    -DatabaseName <DatabaseName>
    [-Force]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

Use the Remove-NAVApplication cmdlet to delete the application tables from the specified Business Central 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 Business Central, 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.

Examples

EXAMPLE 1

Remove-NAVApplication -DatabaseName 'Demo Database NAV'

This example removes the application tables from the specified database on the local server.

EXAMPLE 2

Remove-NAVApplication -DatabaseServer 'MyServer' -DatabaseInstance 'NAVDemo' -DatabaseName 'Demo Database NAV'

This example shows how to remove the application-wide tables from the demonstration database on the specified server and instance.

EXAMPLE 3

Export-NAVApplication -DatabaseServer 'MyServer' -DatabaseInstance 'NAVDEMO' -DatabaseName 'Demo Database NAV' -DestinationDatabaseName 'Business Central app'| Remove-NAVApplication -DatabaseName 'Demo Database NAV' -Force

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, Business Central app, and then removes the tables from the original database. Next, you mount the two databases against a Business Central Server instance by using the Mount-NAVApplication cmdlet and the Mount-NAVTenant cmdlet.

Parameters

-Confirm

Prompts you for confirmation before executing the command.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DatabaseInstance

Specifies the name of the SQL Server instance where the Business Central database is located. The default value is MSSQLSERVER.

Parameter properties

Type:DatabaseInstance
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:True
Value from remaining arguments:False

-DatabaseName

Specifies the name of the database that the application tables must be removed from.

Parameter properties

Type:DatabaseName
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-DatabaseServer

Specifies the name of the computer that is running SQL Server. The default value is localhost.

Parameter properties

Type:DatabaseServer
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:True
Value from remaining arguments:False

-Force

Forces the command to run without asking for user confirmation.

Parameter properties

Type:SwitchParameter
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

-WhatIf

Describes what would happen if you executed the command without actually executing the command.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
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.

Outputs

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.