{"title":"Creating databases in Business Central","url":"https://jonas-paprotka.de/docs/dev-itpro/deployment/devenv-create-databases/","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/devenv-create-databases, 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/devenv-create-databases","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":"Create a new database by using the New-NAVDatabase cmdlet in the Administration Shell.","date":"2023-12-29","meta":{"topic":"how-to"},"outline":[{"level":1,"title":"Creating databases in Business Central","slug":"creating-databases-in-business-central","at":0,"chars":10455},{"level":2,"title":"Overview","slug":"overview","at":216,"chars":1420},{"level":3,"title":"Application and tenant databases","slug":"application-and-tenant-databases","at":228,"chars":1161},{"level":3,"title":"Supported collations","slug":"supported-collations","at":1389,"chars":247},{"level":2,"title":"Create an application database","slug":"create-an-application-database","at":1636,"chars":4972},{"level":2,"title":"Create a tenant database","slug":"create-a-tenant-database","at":6608,"chars":1266},{"level":2,"title":"Next steps","slug":"next-steps","at":7874,"chars":1377},{"level":2,"title":"Integrating directly on SQL Server objects","slug":"integrating-directly-on-sql-server-objects","at":9251,"chars":899},{"level":2,"title":"Related information","slug":"related-information","at":10150,"chars":305}],"text":"# Creating databases in Business Central\n> APPLIES TO: Business Central 2019 release wave 2 and later\nThis article describes how to create new databases in Business Central for storing application and business data.\n## Overview\n### Application and tenant databases\nThere are two types of databases: application and tenant.\n The application database stores data that defines the application and its business logic. This data includes descriptions of the objects and the code of your application. Essentially, it includes data that are common to all tenants. It's the application database to which you publish your extensions, including the base application, system application, and other extensions.\n The tenant database is often referred as just the tenant. The tenant database stores the actual business data for specific companies, for example, data that users enter and modify by using the application. It's the tenant database on which you install extensions that are published to the application database.\nIn a single-tenant deployment architecture, the application data and business (tenant) data are stored in the same database. That is, there's only one database. If you want to set up single-tenant deployment, you only have to create an application database.\nIf you have a multitenant deployment architecture, you create an application database and one or more tenant databases.\n### Supported collations\nBusiness Central supports Windows collations only. For a list of Windows collations, see [Windows Collations\n](/sql/t-sql/statements/windows-collation-name-transact-sql#windows-collations) in the SQL Server documentation.\n## Create an application database\nTo create an application database, for either a single-tenant or multitenant deployment, you use the New-NAVApplicationDatabase cmdlet<https://learn.microsoft.com/powershell/module/microsoft.dynamics.nav.management/new-navapplicationdatabase>. This cmdlet is available in the Business Central Administration Shell. You use the New-NAVApplicationDatabase cmdlet to create either new database or initialize an existing empty database to make it an Business Central application database.\n If you create a new database, the cmdlet adds a database in SQL Server. The database includes the tables and data required for a Business Central application database. The cmdlet creates a master data file (MDF) and log data file (LDF). Using the cmdlet, you can set the database name, the collation, and where to store the data files. Other database options are set for you.\n If you use the cmdlet with an existing database, the cmdlet modifies the existing database to include Business Central application tables and data. You configure a database beforehand, setting options that aren't done by the cmdlet, such as options for the data files (MDF/NDF/LDF) and their filegroups, table partitioning<../administration/optimize-sql-data-access>, and more.\n> TIP\n> Starting in Business Central 2021 release wave 1, the application database will automatically include the platform ../upgrade/upgrade-overview-v15#Symbols.\nTo create an application database, complete the following steps:\n1. Run the Business Central Administration Shell as an administrator.\n Make sure that the Window user that you run as has the appropriate privileges on the SQL Server as described in Assign privileges on the Business Central database-level<provision-server-account#BCdb>.\n2. Run the New-NAVApplicationDatabase cmdlet to create a new database or initialize an existing database.\n ```powershell\n New-NAVApplicationDatabase [-DatabaseServer <database server name>\\<database server instance>] -DatabaseName <String> [-DatabaseLocation <String>] [[-Collation] <String>] [-ApplicationDatabaseCredentials <PSCredential>]\n ```\n To create a new application database, set `-DatabaseName` to the name you want to give the database, and the `-Collation` to the wanted collation. If you omit the `-Collation`, then Latin1_General_100_CS_AS is used by default. Optionally, set the `-DatabaseLocation` to the directory path where you want to store the data files; otherwise the database files will be stored in the default SQL Server location.\n To use an existing empty database, set the `-DatabaseName` to the name of the existing database. You can't use the `-Collation` parameter to change the current collation of the database.\n The following example creates a new database called MyBCApplicationDB. The database is given the collation Latin1_General_100_CS_AS on the SQL Server instance BCDEMO. The database files are stored in the default data directory for the SQL Server instance (for example, C:\\Program Files\\Microsoft SQL Server\\MSSQL13.BCDEMO\\MSSQL\\DATA).\n ```powershell\n New-NAVApplicationDatabase -DatabaseServer .\\BCDEMO -DatabaseName \"MyBCApplicationDB\"\n ```\n When the database has been successfully created, text similar to the following displays:\n ```powershell\n DatabaseServer      : .\\BCDEMO\n DatabaseName        : MyBCApplicationDB\n DatabaseCredentials :\n DatabaseLocation    :\n Collation           : Latin1_General_100_CS_AS\n ```\n3. Connect Business Central Server instance to the new database.\n For example:\n ```powershell\n Set-NAVServerConfiguration -ServerInstance BC -KeyName DatabaseName -KeyValue \"MyBCApplicationDB\"\n ```\n4. Run the Set-NAVApplication cmdlet<https://learn.microsoft.com/powershell/module/microsoft.dynamics.nav.management/set-navapplication> to set the application version on the new database.\n To set the application version, use the `-ApplicationVersion` parameter. The value must have the format `major.minor.[build[.revision]]`, such as '18.1', '18.1.0', or 18.1.0.0'. For example:\n ```powershell\n Set-NAVApplication -ServerInstance BC -ApplicationVersion 18.1.0.0 -Force\n ```\n This step is required to synchronize your tenant and extensions later. This step sets a value to the applicationversion column in the $ndo$dbproperty table of the application database.\n5. Give the Business Central Server service account privileges to the database.\n See Provisioning the Business Central Server Service Account<provision-server-account#BCdb>.\n If you have a multitenant deployment, go to the next section about creating a tenant database.\n6. If you have a single-tenant deployment, you can now synchronize the tenant. For a multitenant deployment, go to the next section.\n Run the https://learn.microsoft.com/powershell/module/microsoft.dynamics.nav.management/sync-navtenant cmdlet to synchronize the tenant. For example:\n ```powershell\n Sync-NAVTenant -ServerInstance BC\n ```\n This step creates the tenant-related tables in the database.\n## Create a tenant database\nComplete the followings step to create a new tenant database in a multitenant deployment.\n1. In SQL Server, create a new database.\n> IMPORTANT\n> Set the collation to the same as the application database.\n2. Give the Business Central Server service account privileges to the database, like you did with the application database.\n See Provisioning the Business Central Server Service Account<provision-server-account#BCdb>.\n3. Mount the database as a tenant to the application.\n To mount the tenant, use the https://learn.microsoft.com/powershell/module/microsoft.dynamics.nav.management/mount-navtenant cmdlet. For example:\n ```powershell\n Mount-NAVTenant -ServerInstance BC -DatabaseName \"BCTenantDB\" -DatabaseServer .\\BCDEMO -Tenant BCTenant1 -AllowAppDatabaseWrite\n ```\n> NOTE\n> For now, we recommend that you use the `-AllowAppDatabaseWrite` parameter. Later, you can dismount and mount the tenant again without the parameter if needed.\n4. Synchronize the tenant.\n Use the https://learn.microsoft.com/powershell/module/microsoft.dynamics.nav.management/sync-navtenant cmdlet. For example:\n ```powershell\n Sync-NAVTenant -ServerInstance BC -Tenant BCTenant1 -Mode Sync\n ```\n This step creates the tenant-related tables in the database.\n## Next steps\nComplete the following steps to get the application up and running on your tenants.\n1. Publish the system symbols and extensions that make up your application. For example, publish the system application, base application, Microsoft extensions, and third-party extensions.\n See ../developer/devenv-how-publish-and-install-an-extension-v2.\n For Business Central 2021 release wave 1 and later, you don't have to publish the symbols, because they've been automatically published for you.\n2. Synchronize and install extensions on the tenant.\n See ../developer/devenv-how-publish-and-install-an-extension-v2.\n3. Add a company to the database.\n To add a company, run the New-NAVCompany cmdlet<https://learn.microsoft.com/powershell/module/microsoft.dynamics.nav.management/new-navcompany>.\n4. Export and import existing permissions sets.\n A new database won't include any permission sets except for the SUPER permission set. Also, there will only be one user, typically for your account. You can either create permissions sets from scratch or export the sets from an existing database. As a minimum, it's a good idea to export the BASIC permissions set. The BASIC permission set grants the minimum permissions required for any user to access the application.\n See ../developer/devenv-export-permission-sets and ../administration/administration-special-permission-sets.\n## Integrating directly on SQL Server objects\n> WARNING\n> During operations such as upgrade and app/extension synchronization, the Business Central Server synchronizes the metadata model defined in AL to physical tables on the SQL Server database.\n> While it's possible to integrate directly with SQL Server objects on the database (bypassing the Business Central Server), it's not recommended or even supported.\n> Altering SQL objects created by the Business Central Server directly on the database can break operations such as upgrade and app/extension synchronization.\n> Adding additional SQL objects such as triggers or stored procedures directly on the database can break operations like upgrade and app/extension synchronization, but will also break system integrations that depend on such additional objects if the table schema created by the Business Central Server synchronization changes.\n## Related information\nChanging Collation of Existing Database<../cside/cside-change-database-collation>\nMultitenant Deployment Architecture in Business Central<multitenant-deployment-architecture>\nCreating and Altering Business Central Databases (Spring 2019 and earlier)<../cside/cside-create-databases>"}