Export-NAVApplication
Export-NAVApplication
Extracts the application tables in a Microsoft Dynamics NAV database to a separate database. The new application database is created on the same SQL Server instance as the original database.
Syntax
Parameter Set: Default
Export-NAVApplication -DatabaseName <DatabaseName> -DestinationDatabaseName <DatabaseName> [-DatabaseInstance <DatabaseInstance> ] [-DatabaseServer <DatabaseServer> ] [-Force] [-ServiceAccount <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
Use the Export-NavApplication cmdlet to export the tables that define the Microsoft Dynamics NAV application to a dedicated database. If you want to deploy your Microsoft Dynamics NAV 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.
Parameters
-DatabaseInstance<DatabaseInstance>
Specifies the SQL Server instance on which the Microsoft Dynamics NAV database is installed. The new application database will be created on the same SQL Server instance as the original database.
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 Microsoft Dynamics NAV database that contains the application tables, such as ‘Demo Database NAV (8-0)’. This database is the original database that application tables will be extracted 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 on which the SQL Server instance for the Microsoft Dynamics NAV database is installed.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-DestinationDatabaseName<DatabaseName>
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.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
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 |
-ServiceAccount<String>
The account that Microsoft Dynamics NAV 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.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
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
This cmdlet does not consume any input.
Outputs
The output type is the type of the objects that the cmdlet emits.
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.
Examples
--------------------------EXAMPLE 1--------------------------
Description
-----------
This example extracts the application tables from the specified database to a new application database on the local server.
PS C:\> Export-Application -DatabaseName 'Demo Database NAV (8-0)' -DestinationDatabaseName NAVApp
--------------------------EXAMPLE 2--------------------------
Description
-----------
This example extracts the application tables from the specified database to a new application database on the local server.
PS C:\> Export-Application -DatabaseName 'Demo Database NAV (8-0)' -DestinationDatabaseName NAVApp -ServiceAccount 'mydomain\navdbaccount'
--------------------------EXAMPLE 3--------------------------
Description
-----------
This example extracts the application tables from the specified database to a new application database on the specified server and instance.
PS C:\> Export-NAVApplication –DatabaseServer 'MyServer' –DatabaseInstance 'NavDemo' –DatabaseName 'Demo Database NAV (8-0)' –DestinationDatabaseName 'NAV App'
--------------------------Example 4--------------------------
Description
-----------
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.
PS C:\> Export-NAVApplication -DatabaseServer 'MyServer' –DatabaseInstance 'NavDemo' –DatabaseName 'Demo Database NAV (8-0)' –DestinationDatabaseName 'NAV App' | Remove-NAVApplication -Force