web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

BC On-Premises - Create New Database from Powershell

(0) ShareShare
ReportReport
Posted on by 305

Hi,

I try to deploy BC On-Prem 2022 release wave 1 CU12. For some technical reasons I'm not able to restore a Demo Database in our environment. So I'm following instructions found on MS site: Creating Databases in Business Central

I installed all BC Components. Then I created the database

New-NAVApplicationDatabase -DatabaseServer 'SQLSERVER\SQLINSTANCE' -DatabaseName 'PRODUCTION' -Collation Polish_100_CS_AS
Set-NAVServerConfiguration -ServerInstance 'BC_Service' -KeyName DatabaseName -KeyValue 'PRODUCTION'

db_owner privileges granted to BC Service Account.

I can start the BC Service without any errors.

Next I executed following commands

Set-NAVApplication -ServerInstance 'BC_Service' -ApplicationVersion 20.0.54861 -Force
New-NAVCompany -ServerInstance 'BC_Service' -CompanyName 'Company' -CompanyDisplayName 'Company Name' 
Sync-NAVTenant -ServerInstance 'BC_Service' -Mode ForceSync -Verbose 

I restarted the BC Service. When I try to open BC an error occures: The metadata object Page 0 was not found.

So I tried to install all the system apps, even if MS is saying "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.".

Publish-NAVApp -ServerInstance 'BC_Service' -Path 'C:\DVD\Applications\system application\source\Microsoft_System Application.app' -Verbose
Publish-NAVApp -ServerInstance 'BC_Service' -Path 'C:\DVD\Applications\BaseApp\Source\Microsoft_Base Application.app' -Verbose
Publish-NAVApp -ServerInstance 'BC_Service' -Path 'C:\DVD\Applications\Application\Source\Microsoft_Application.app' -Verbose

I ran Sync-NAVTenant, Sync-NAVApp and restarted the BC Service several times, no luck, still same error The metadata object Page 0 was not found.

In SSMS I can see all the SQL Tables and Views were created successfully.

Am I missing something? How to create and deploy new empty BC On-Prem Database?

I have the same question (0)
  • Suggested answer
    toLL Profile Picture
    305 on at

    I forgot to run

    Install-NAVApp -ServerInstance 'BC_Service' -Name 'System Application' -SyncMode ForceSync -Verbose

    it works now.

  • Suggested answer
    Nitin Verma Profile Picture
    21,812 Moderator on at

    Thanks for update.

  • Suggested answer
    Saurav.Dhyani Profile Picture
    14,419 User Group Leader on at

    Hope this helps.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,909 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,145 Super User 2026 Season 1

#3
AndrewThomas81 Profile Picture

AndrewThomas81 974

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans