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

Backing up database in powershell

(0) ShareShare
ReportReport
Posted on by

I am trying to backup database in powershell. I am currently trying to update my version of Business Central (19.0) to the newest (20.0). I am following the documentation and when I try to back up database I keep getting this error:

PS C:\Users\Administrator> Backup-SqlDatabase -ServerInstance BC190 -Database "Demo Database BC (19-0)" -BackupFile "C:\DBbackup\LVNLite.bak"
Backup-SqlDatabase : Failed to connect to server BC190.
At line:1 char:1
  Backup-SqlDatabase -ServerInstance BC190 -Database "Demo Database BC  ...
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      CategoryInfo          : NotSpecified: (:) [Backup-SqlDatabase], ConnectionFailureException
      FullyQualifiedErrorId : Microsoft.SqlServer.Management.Common.ConnectionFailureException,Microsoft.SqlServer.Management.PowerShell
   .BackupSqlDatabaseCommand

I have seen that some people have had trouble with the server instance. I am not sure what I am doing wrong here. Can anyone help?

I have the same question (0)
  • Suggested answer
    YUN ZHU Profile Picture
    99,055 Super User 2026 Season 1 on at

    Hi, the instance here is not BC instance, this is SQL Server Instance.

    https://docs.microsoft.com/en-us/powershell/module/sqlserver/backup-sqldatabase?view=sqlserver-ps

    pastedimage1649297682467v1.png

    For example:

    pastedimage1649297770781v2.png

    Hope this will help.

    Thanks.

    ZHU

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,926 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,158 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 533 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans