Learning and Sharing
  • Home
  • Blog
  • Linux
  • macOS
  • Virtualization
    • VMware
    • VirtualBox
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server
  • Series
    • Symantec
    • Intune
    • Microsoft Azure
    • Powershell
    • VirtualBox
    • VMware
    • PowerShell Learning
    • Microsoft Graph
  • More
    • Auto Installation
    • AEC Installation
  • Contact
No Result
View All Result
  • Home
  • Blog
  • Linux
  • macOS
  • Virtualization
    • VMware
    • VirtualBox
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server
  • Series
    • Symantec
    • Intune
    • Microsoft Azure
    • Powershell
    • VirtualBox
    • VMware
    • PowerShell Learning
    • Microsoft Graph
  • More
    • Auto Installation
    • AEC Installation
  • Contact
No Result
View All Result
No Result
View All Result

How to Backup SQL Server Databases to a Network Share Drive

July 23, 2022
in Blog, SQL Server
1
ADVERTISEMENT

Table of Contents

How to backup SQL database to remote location?

Backing up beforehand can avoid accidental deletion or corruption of SQL database. But when it’s comes to system failure or computer breakdown, a backup on local drive is pointless. That’s why you need to backup SQL database to remote location like network share, NAS or mapped drive.

The way to do this is nothing different – you can set up backup in SQL Server Management Studio just as usual. But some errors may occur during the process, like Operating system error 3 (The system cannot find the path specified) and Operating system error 5 (Access is denied).

Bg1235

You can use SSMS backup wizard or T-SQL to backup SQL database to network drive, but while specifying a remote location as destination, some operating system errors (like error 3 or error 5) might fail the backup. This is usually due to path issue or permission issue. Simply put, you should be aware that:

  • When backing up to a mapped drive, enter its UNC name instead of mapped drive letter.
  • Provide full permissions of the target share to the account you log on SQL Server as.

Backup with SSMS backup wizard:

1. Connect to your server. Right-click the database you want to backup, and choose Task > Back Up.

Bg1236

2. In the pop-up wizard, you could configure the database, backup type and destination. In the destination section, Remove the default path and Add a new one.

It’s not allowed to select a share or mapped drive directly, so you need to enter its UNC name of the remote location. For example, I want to backup database to a network share “\\10.0.0.5\backup” and name the backup file as “kav.bak”. Then I need to enter “\\10.0.0.5\backup\kav.bak” .

ADVERTISEMENT

Tip: Mapped Share Drive Not Showing for SQL Backup and Restore in SSMS

Bg1237

3. Click OK to perform the operation.

Bg1238

Backup failed with Operating system error 5 (Access is denied)?

When you specify a network share in your local drive or a remote machine, the backup may also fail due to error 5:

Bg1235

This is usually because the account you log on the SQL Server as doesn’t have the permission to read & write data to the share. To fix it, you need to find the account, then provide full privilege to it. Here’s the approach:

In the domain environment

1. In the domain environment, you can grant read and write permission for the SQL server computer account.

Bgf014

2. Grant NTFS permission for SQL server computer account on shared folder.

Bgf013

In a WORKGROUP environment

In a workgroup environment, you cannot specify computer account because it not exist in the file share server.

1. Let create an user in the SQL server and file share server with the same username and password.

In the SQL Server:

net user /add sqlbackup Pass@word
net localgroup administrators /add sqlbackup

In the file share server:

net user /add sqlbackup Pass@word

2. In the file share server, add share permission and NTFS permission for the newly created user on the shared folder.

Bg1242
Bg1243

3. In the SQL server, change the service account to the newly created user then restart SQL service.

Bgf015
5/5 - (1 vote)
Previous Post

How to Expand or Increase Ubuntu Virtual Disk In VirtualBox

Next Post

Mapped Share Drive Not Showing for SQL Backup and Restore in SSMS

Related Posts

Running Hyper-V and VMware Workstation on The Same Machine

August 15, 2024

How to Uninstall All Autodesk Products At Once Silently

July 29, 2024
Ftr5

How to Uninstall the Autodesk Genuine Service on Windows

July 29, 2024
Ftr19

How to Fix Windows Cannot Read the ProductKey From the Unattend Answer File in VirtualBox

July 26, 2024
Ftr25

How to Update Windows Terminal in Windows 10/11

July 26, 2024

How to Disable The Beep Sound in WSL Terminal on Windows

July 26, 2024

Comments 1

  1. VIve says:
    1 year ago

    is this possible if i want to back it up in another device where it isn’t connected to the same network?

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • How To Turn On uBlock Origin Extension in Chrome (2025)
  • Images Hidden Due To Mature Content Settings In CivitAI
  • Azure OpenAI vs Azure AI Hub, How to Choose the Right One for Your Needs

Categories

Stay in Touch

Discord Server

Join the Discord server with the site members for all questions and discussions.

Telegram Community

Jump in Telegram server. Ask questions and discuss everything with the site members.

Youtube Channel

Watch more videos, learning and sharing with Leo ❤❤❤. Sharing to be better.

Newsletter

Join the movement and receive our weekly Tech related newsletter. It’s Free.

General

Microsoft Windows

Microsoft Office

VMware

VirtualBox

Technology

PowerShell

Microsoft 365

Microsoft Teams

Email Servers

Copyright 2025 © All rights Reserved. Design by Leo with ❤

No Result
View All Result
  • Home
  • Linux
  • Intune
  • macOS
  • VMware
  • VirtualBox
  • Powershell
  • Windows 10
  • Windows 11
  • Microsoft 365
  • Microsoft Azure
  • Microsoft Office
  • Active Directory

No Result
View All Result
  • Home
  • Linux
  • Intune
  • macOS
  • VMware
  • VirtualBox
  • Powershell
  • Windows 10
  • Windows 11
  • Microsoft 365
  • Microsoft Azure
  • Microsoft Office
  • Active Directory