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

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.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters: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.

Type:DatabaseInstance
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters: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.

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

-DatabaseServer

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

Type:DatabaseServer
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters: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.

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

-Force

Forces the command to run without asking for user confirmation.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters: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.

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

-WhatIf

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

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

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.