{"title":"Separating Application Data from Business Data","url":"https://jonas-paprotka.de/docs/dev-itpro/deployment/separating-application-data-from-business-data/","by":"JOP-AL","license":"Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/deployment/separating-application-data-from-business-data, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/deployment/separating-application-data-from-business-data","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"Learn how to create an split your database into an application database and business database","date":"2021-04-01","meta":{"topic":"how-to"},"outline":[{"level":2,"title":"Application Database versus Business Data Databases","slug":"application-database-versus-business-data-databases","at":366,"chars":3046},{"level":3,"title":"Distribution of the System Tables in Each Database","slug":"distribution-of-the-system-tables-in-each-database","at":1715,"chars":1697},{"level":2,"title":"Exporting the Application Tables to a Dedicated Application Database","slug":"exporting-the-application-tables-to-a-dedicated-application-database","at":3412,"chars":8081},{"level":3,"title":"Export the application tables to a dedicated database","slug":"export-the-application-tables-to-a-dedicated-database","at":4097,"chars":7396},{"level":2,"title":"Example","slug":"example","at":11493,"chars":2907},{"level":2,"title":"Related information","slug":"related-information","at":14400,"chars":158}],"text":"Business Central separates tables that describe the application from the tables that contain business data. Depending on your deployment scenario, you can choose to store all Business Central tables in one database, or you can export the application tables to a dedicated database. In multitenant deployments, the application must be stored in a dedicated database.\n## Application Database versus Business Data Databases\nThe application database contains tables that describe your application. This includes a description of the objects that your application consists of, and other data that is common to all tenants. The data that users enter in your application is stored in the business data database because this data is specific to their company. Optionally, you can create multiple business data databases, such as if you want to support your customers as tenants.\nWhen you have exported the application tables to a separate database, you can no longer access the business database from the Dynamics NAV Development Environment. This is because the metadata for the tables in the business database is stored in the application database and modified in that database.\nFor example, if you want to modify a report, you modify the report object in the application database. Then, when you deploy the updated application to your production environment, when a user accesses the report, they see the modified report.\nBusiness Central includes Windows PowerShell cmdlets that help you export application tables to a dedicated database, and other cmdlets to help you maintain a multitenant deployment. See Business Central Windows PowerShell Cmdlets<https://learn.microsoft.com/powershell/business-central/overview>.\n### Distribution of the System Tables in Each Database\nThe application tables are system tables that define the application. Other system tables remain in the business data database. For example, the following table lists some of the system tables that are moved to the application database when you run the Export-NAVApplication cmdlet and other tables that remain in the business data database. This is a partial list to give an idea of how tables are distributed:\nApplication database|Business data database\nAdd-in|Access Control\nApplication Dependency|Active Session\nApplication Object Metadata|API Webhook Notification\nApplication Resource|API Webhook Notification Aggr\nChart|API Webhook Subscription\nConfiguration Package File|Company\nDebugger Breakpoint|Device\nDebugger Watch|Data Sensitivity\nEntitlement|Document Service\nEntitlement Set|Intelligent Cloud\nInstalled Application|Intelligent Cloud Status\nMedia|Isolated Storage\nMedia Resources|Object Options\nMedia Set|Object Metadata Snapshot\nMembership Entitlement|Object Translation\nObject|Integration Page\nObject Metadata|Object Metadata Snapshot\nObject Tracking|Object Translation\nOData Edm Type|Object Access Intent Override\nPage Documentation|Page Data Personalization\nPower BI Blob|Printer Selection\nPower BI Selection|Record Link\nPermission|Report List Translation\nPermission Set|Session Event\nProfile|Scheduled Task\nProfile Metadata|Tenant Media\nProfile Page Metadata|Tenant Permission\nPublished Application|Tenant Profile\nReport Layout|Tenant Profile Extension\nSend-To Program|Tenant Web Service\nServer Instance|User\nStyle Sheet|User Default Style Sheet\nUpgrade Blob Storage|Web Hook Notification\nWeb Service|Web Hook Subscription\n## Exporting the Application Tables to a Dedicated Application Database\nTo export the application tables from an existing database to another database, Business Central provides a Windows PowerShell cmdlet as part of the Business Central Administration Shell.\nThe following procedure illustrates how you can separate the application tables in an existing database into two databases: an application database and a business data database. You can automate this process and combine it with the use of other cmdlets. For more information, see the samples in the Windows PowerShell scripts in the ...\\\\WindowsPowerShellScripts\\\\Multitenancy\\\\ folder on the Business Central product media.\n### Export the application tables to a dedicated database\n1. Stop all Business Central Server services that access the database that you are modifying. This includes the Business Central Server instance.\n2. Back up your databases.\n3. Run the Business Central Administration Shell as an administrator.\n> IMPORTANT\n> You must run the program as administrator. Also, you must ensure that scripting is enabled on the computer.\nSee Business Central Windows PowerShell Cmdlets<https://learn.microsoft.com/powershell/business-central/overview>.\n4. Uninstall the extensions.\n To uninstall an extension, you use the https://learn.microsoft.com/powershell/module/microsoft.dynamics.nav.apps.management/uninstall-navapp cmdlet.\n ```powershell\n Uninstall-NAVApp -ServerInstance <server instance name> -Tenant default -Name <extensions name> -Version <extension version>\n ```\n Replace `<extension name>` and `<extension version>` with the exact name and version the installed extension. Set `<tenant ID>` to default or omit the `-Tenant` parameter.\n For example, together with the Get-NAVApp cmdlet, you can uninstall all extensions with a single command:\n ```powershell\n Get-NAVAppInfo -ServerInstance <server instance name> -Tenant default | % { Uninstall-NAVApp -ServerInstance <server instance name> -Tenant default -Name $_.Name -Version $_.Version -Force}\n ```\n4. To export the application tables, type the following command:\n ```\n Export-NAVApplication –DatabaseServer <server name> -DatabaseInstance <instance name> –DatabaseName <name of original database> –DestinationDatabaseName <name of new application database> -ServiceAccount <the account used by server instance if not NT AUTHORITY\\NETWORK SERVICE>\n ```\n For example, to run the cmdlet against the CRONUS International Ltd. demonstration database, type the following command:\n ```powershell\n Export-NAVApplication –DatabaseServer 'MyServer' –DatabaseInstance 'BCDemo' –DatabaseName 'Demo Database BC' –DestinationDatabaseName 'Business Central App'\n ```\n In the example, the database server name is MyServer , and the SQL Server instance is BCDemo. The name of the new application database can be anything. You can specify a name that reflects your application.\n The application database is created on the same SQL Server instance as the original database. In the example, if you connect to the BCDemo instance using SQL Server Management Studio you will see two databases: the original database, Demo Database BC, and the new application database, Business Central.\n At this stage, the original database still contains the application tables, and you can still access it using the Dynamics NAV Development Environment. Next, you must remove the application tables from the original database to make it a tenant database.\n> TIP\n> Optionally, you can combine the Export-NAVApplication and Remove-NAVApplication cmdlets. For an example of how you can combine the two cmdlets, see the Example section.\n5. To remove the application tables from the original database, run the https://learn.microsoft.com/powershell/module/microsoft.dynamics.nav.management/remove-navapplication cmdlet as follows:\n ```powershell\n Remove-NAVApplication –DatabaseServer <server name> -DatabaseInstance <instance name> –DatabaseName <name of the original database>\n ```\n For example, to run the cmdlet against the CRONUS International Ltd. demonstration database where you have exported the application tables, type the following command:\n ```powershell\n Remove-NAVApplication –DatabaseServer 'MyServer' –DatabaseInstance 'BCDEMO' –DatabaseName 'Demo Database BC'\n ```\n You will be asked to confirm that you want to remove the tables.\n> WARNING\n> Running the Remove-NAVApplication cmdlet is not reversible. When you have removed the application tables from the database, you cannot import them again. Make sure that you have a full backup available.\nAt the end of the process, you have two databases. In the example earlier in this topic, the databases are as follows.\nDatabase name|Database type|Description\nDemo Database BC|Business data database|Contains the data from the original database.\nBusiness Central App|Application database|Contains the tables that define the application.\n6. Clear the DatabaseName setting in the Business Central Server instance configuration file by using the https://learn.microsoft.com/powershell/module/microsoft.dynamics.nav.management/set-navserverconfiguration cmdlet:\n ```powershell\n Set-NAVServerConfiguration –ServerInstance <server instance name> –element appSettings –KeyName 'DatabaseName' –KeyValue ''\n ```\n7. Start the Business Central Server instance by using the https://learn.microsoft.com/powershell/module/microsoft.dynamics.nav.management/start-navserverinstance cmdlet:\n ```powershell\n Start-NAVServerInstance –ServerInstance <server instance name>\n ```\n8. Mount the application database on the Business Central Server instance by using the https://learn.microsoft.com/powershell/module/microsoft.dynamics.nav.management/mount-navapplication cmdlet:\n ```powershell\n Mount-NAVApplication –ServerInstance <server instance name> –DatabaseServer <server name\\instance name> –DatabaseName <application database name>\n ```\n9. Mount the business data database (tenant) on the server instance by using the https://learn.microsoft.com/powershell/module/microsoft.dynamics.nav.management/mount-navtenant cmdlet:\n ```powershell\n Mount-NAVTenant –ServerInstance <server instance name> -Id <tenant name> –DatabaseServer <server name\\instance name> -DatabaseName <business data database> -OverwriteTenantIdInDatabase\n ```\n10. Reinstall extensions.\n In this step, you reinstall the same extensions that were installed on the tenant before. To install an extension, you use the Install-NAVApp cmdlet<https://learn.microsoft.com/powershell/module/microsoft.dynamics.nav.apps.management/install-navapp>.\n 1. It can be helpful to get a list of the published extensions and their version. To get a list of all published extensions, use the Get-NAVAppInfo cmdlet<https://learn.microsoft.com/powershell/module/microsoft.dynamics.nav.apps.management/get-navappinfo>:\n  ```powershell\n  Get-NAVAppInfo -ServerInstance <server instance> | Repair-NAVApp\n  ```\n 2. If your solution uses the System Application, install this first.\n  ```powershell\n  Install-NAVApp -ServerInstance <server instance> -Name \"System Application\" -Version <extension version>\n  ```\n  Replace `<extension version>` with the exact version of the published System Application.\n 3. Install the Base Application.\n  ```powershell\n  Install-NAVApp -ServerInstance <server instance> -Name \"Base Application\" -Version <extension version>\n  ```\n  Replace `<extension version>` with the exact version of the published Base Application.\n 4. Install the Application extension. This extension is required to install Microsoft extensions.\n  ```powershell\n  Install-NAVApp -ServerInstance <server instance> -Name \"Application\" -Version <extension version>\n  ```\n  Replace `<extension version>` with the exact version of the published Application extension.\n 5. Install other extensions, including Microsoft and third-party extensions.\n  ```powershell\n  Install-NAVApp -ServerInstance <server instance name> -Name <extension name> -Version <extension version>\n  ```\nSee Business Central Windows PowerShell Cmdlets<https://learn.microsoft.com/powershell/business-central/overview>.\n## Example\nThe following code example illustrates how you can manually write commands in the Business Central administration shell. The commands create an application database based on an existing Business Central database.\nThe sample commands are assumed to run in the Business Central administration shell based on the CRONUS International Ltd. demonstration database on a local computer.\n```powershell\nStop-NAVServerInstance –ServerInstance 'businesscentral_server_instance'\nExport-NAVApplication –DatabaseServer 'MyServer' –DatabaseInstance 'BCDEMO' –DatabaseName 'Demo Database BC' –DestinationDatabaseName 'Business Central App'| Remove-NAVApplication –DatabaseName 'Demo Database BC' -Force\nSet-NAVServerConfiguration –ServerInstance 'businesscentral_server_instance' –element appSettings –KeyName 'DatabaseName' –KeyValue ''\nStart-NAVServerInstance –ServerInstance 'businesscentral_server_instance'\nMount-NAVApplication –ServerInstance 'businesscentral_server_instance' –DatabaseServer 'MyServer\\BCDEMO' –DatabaseName 'Business Central App'\nMount-NAVTenant –ServerInstance 'businesscentral_server_instance' -Id tenant1 –DatabaseServer 'MyServer\\BCDEMO' -DatabaseName 'Demo Database BC' -OverwriteTenantIdInDatabase\n```\nIn the example, the commands stop the Business Central Server service, creates the application database, clears the default database name in the server configuration, and then restarts the service. Then, the application database and the tenant database are mounted, and the configuration is saved in the Tenants.config file on the server. As a result, you have an application database and a single-tenant deployment. When you try to open the Dynamics NAV Client connected to Business Central, an error displays because you have not specified a tenant. So in the Select Server window, in the Server Address field, add the tenant ID to the address. In this example, the address is localhost:7085/BC210/tenant1.\n> TIP\n> For an example of how you can automate the process of transferring user accounts from the original database to the new application database, see the HowTo-ExportNAVApplicationDatabase.ps1 sample script. This and other sample scripts are in the ...\\\\Windows PowerShell\\\\Multitenancy\\\\ folder on the Business Central product media. The ExportNAVApplicationDatabase.ps1 sample script can be run in the context of the NAVUpgradeSamples.psm1 script module file. When you call a script such as this, it will export the application tables to a new application database and copy all accounts and SQL Server user roles to the application database. To only transfer the account that the Business Central Server instance uses, use the -ServiceAccount parameter for the Export-NAVApplication cmdlet. In the examples in this topic, this parameter has not been specified. As a result, the default account, NT AUTHORITY\\\\NETWORK SERVICE, is set up with the required user roles.\n## Related information\nmigrating-to-multitenancy\nBusiness Central Windows PowerShell Cmdlets<https://learn.microsoft.com/powershell/business-central/overview>"}