Export-NAVApplication
Extracts the application tables in a Business Central database to a separate database. The new application database is created on the same SQL Server instance as the original database.
Syntax
Default (Default)
Export-NAVApplication
[-DatabaseServer <DatabaseServer>]
[-DatabaseInstance <DatabaseInstance>]
-DatabaseName <DatabaseName>
-DestinationDatabaseName <DatabaseName>
[-ServiceAccount <String>]
[-Force]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Use the Export-NAVApplication cmdlet to export the tables that define the Business Central application to a dedicated database. If you want to deploy your Business Central solution in a multitenant deployment architecture, you must separate the application tables in an existing database into two databases: an application database and a business data database. You can combine the Export-NAVApplication cmdlet with the Remove-NAVApplication cmdlet. Before you use the Export-NAVApplication cmdlet, we recommend that you create a full backup of your existing database.
Examples
EXAMPLE 1
Export-NAVApplication -DatabaseName 'Demo Database NAV' -DestinationDatabaseName NAVApp
This example extracts the application tables from the specified database to a new application database on the local server.
EXAMPLE 2
Export-NAVApplication -DatabaseName 'Demo Database NAV' -DestinationDatabaseName NAVApp -ServiceAccount 'mydomain\navdbaccount'
This example extracts the application tables from the specified database to a new application database on the local server.
EXAMPLE 3
Export-NAVApplication -DatabaseServer 'MyServer' -DatabaseInstance 'NavDemo' -DatabaseName 'Demo Database NAV' -DestinationDatabaseName 'Business Central app'
This example extracts the application tables from the specified database to a new application database on the specified server and instance.
EXAMPLE 4
Export-NAVApplication -DatabaseServer 'MyServer' -DatabaseInstance 'NavDemo' -DatabaseName 'Demo Database NAV' -DestinationDatabaseName 'Business Central app' | Remove-NAVApplication -Force
This example extracts the application tables from the specified database to a new application database on the specified server and instance. It then pipes the name of the database to the Remove-NAVApplication cmdlet, which removes the application tables from the original database.
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 SQL Server instance on which the Business Central database is installed. The new application database will be created on the same SQL Server instance as the original database.
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 Business Central database that contains the application tables, such as 'Demo Database NAV (11-0)'. This database is the original database that application tables will be extracted 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 on which the SQL Server instance for the Business Central database is installed.
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 |
-DestinationDatabaseName
Specifies the name of the database that you want to export the tables to. If a database with that name does not exist, a new database is created on the same SQL Server instance as the original database.
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: | False |
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 |
-ServiceAccount
The account that Business Central Server uses to access SQL Server. The database roles that the account has will be copied from the original database to the new application database. If this parameter is not specified, the Export-NAVApplication cmdlet will use the NT AUTHORITY\NETWORK SERVICE account.
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: | True |
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
The value of the DatabaseServer parameter.
System.String ServerInstance
The value of the ServerInstance parameter.
System.String DatabaseName
The value of the DatabaseName parameter.