Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

SQL Server Error 1419: Fix Remote Copy Issue

· 7 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

SQL Server error 1419 occurs when you try to restore a database from a backup that was taken on a different server (or a different instance) and the service account on the target server does not have the necessary permissions to access the backup file or the destination folder. The full message typically reads: "The remote copy of database 'YourDB' cannot be opened due to inaccessible files or insufficient memory or disk space." The fix is to grant the SQL Server service account (or the account under which the restore is running) read/write permissions on the backup file and the target data/log folders, or to move the backup file to a local path that the service account can access. Below is a step-by-step guide to resolve this error.

What You'll Need

  • Administrative access to the SQL Server instance (sysadmin role) and to the Windows server hosting SQL Server.
  • The exact path of the backup file (.bak) and the destination folder for the restored database files (data and log).
  • Knowledge of the SQL Server service account name (e.g., NT Service\MSSQLSERVER or a domain account). You can find it in SQL Server Configuration Manager or in the Services console.
  • Permission to modify folder and file permissions on the server (local administrator or equivalent).

Step-by-Step

  1. Identify the SQL Server service account. Open SQL Server Configuration Manager, expand SQL Server Services, and note the account listed in the "Log On As" column for your SQL Server instance (e.g., NT Service\MSSQLSERVER for the default instance, or a domain account). Alternatively, open the Services console (services.msc), find the SQL Server (INSTANCE) service, right-click and choose Properties, then look at the Log On tab. This is the account that needs permissions.
  2. Locate the backup file and destination folder. Determine the full path of the backup file you are trying to restore. Also determine the default data and log directories for the target instance. You can find these by running SELECT SERVERPROPERTY('InstanceDefaultDataPath') and SELECT SERVERPROPERTY('InstanceDefaultLogPath') in a query window, or by checking the Database Properties > Files page for an existing database. If you plan to restore to a custom location, note that path too.
  3. Grant permissions on the backup file. In File Explorer, navigate to the backup file, right-click it, choose Properties > Security tab, and click Edit. Add the SQL Server service account and give it at least Read & execute and Read permissions. If the file is on a network share, you must grant the service account (or the machine account if using a domain) access to the share and to the folder. For a share, also ensure the share permissions allow Read.
  4. Grant permissions on the destination folders. The service account needs Write and Modify permissions on the folder where the data and log files will be created. Right-click the destination folder, choose Properties > Security > Edit, add the service account, and grant Modify (or at least Write). If you are restoring to the default data directory, that is typically already configured, but verify.
  5. If the backup is on a remote share, consider copying it locally. A common workaround is to copy the .bak file to a local drive on the SQL Server machine (e.g., C:\Backups) and then restore from there. This avoids network permission complexities. After copying, ensure the service account has Read access to the local file.
  6. Run the restore command or use SSMS. Open SQL Server Management Studio, connect to the instance, right-click Databases, and choose Restore Database. Select Device, browse to the backup file, and proceed. Alternatively, use T-SQL: RESTORE DATABASE YourDB FROM DISK = 'C:\Backups\YourDB.bak' WITH MOVE 'YourDB_Data' TO 'C:\Data\YourDB.mdf', MOVE 'YourDB_Log' TO 'C:\Data\YourDB.ldf'; Adjust the logical file names as needed (you can find them by running RESTORE FILELISTONLY FROM DISK = 'C:\Backups\YourDB.bak').
  7. Verify the restore completes. After execution, check for success messages. If the error persists, double-check that the service account has not only folder permissions but also that no explicit Deny permissions are blocking access. Also ensure the account has the "Log on as a service" right (usually set by default).

Common Mistakes

  • Granting permissions to the wrong account. People often give permissions to their own user account or to the SQL Server Agent account instead of the SQL Server service account. Double-check the "Log On As" identity.
  • Forgetting share permissions. When the backup is on a network share, both the share permissions and the NTFS permissions must allow access. Share permissions are often overlooked.
  • Assuming the service account has sysadmin rights. Even if the service account is a sysadmin in SQL Server, it still needs Windows file system permissions to read the backup and write the database files.
  • Using a mapped drive. Mapped drives are per-user and not available to the service account. Use UNC paths (\\server\share) or local paths instead.
  • Ignoring the destination folder permissions. The error can also occur if the service account cannot write to the folder where the database files will be placed, even if the backup file is readable.

Tips

  • Always test a restore on a non-production server first to catch permission issues early.
  • Use a dedicated service account with minimal necessary permissions rather than Local System for better security.
  • Keep backup files in a local folder on the SQL Server machine to simplify permission management.
  • When moving a database between servers, use the WITH MOVE option to specify new file paths that the service account can access.
  • Document the service account and its permissions for future reference.

Troubleshooting

If you have granted permissions and still see error 1419, work through these checks:

  • Verify effective permissions. Use the Effective Access tab in the Advanced Security Settings dialog (Windows) to confirm the service account has the required access. Sometimes inheritance or explicit deny entries interfere.
  • Check the SQL Server error log. The error log may contain more details about which file or folder is inaccessible. Look for messages around the time of the restore attempt.
  • Try restoring to a different location. If the default data directory is on a drive with restricted permissions, restore to a folder like C:\Temp with broad permissions to isolate the issue.
  • Ensure the service account has the "Replace a process level token" right. This is rarely the cause but can affect file access in some configurations. Check Local Security Policy > User Rights Assignment.
  • Restart the SQL Server service. After changing permissions, a restart is not usually required, but it can help if the account token is cached.
  • Consider using a different account for the restore. You can run the restore under a SQL Server login that has sysadmin rights, but the file access is still governed by the service account. There is no way to impersonate a different Windows account for file access during restore.

Frequently Asked Questions

What causes SQL Server error 1419?

The error is caused by the SQL Server service account lacking permission to read the backup file or write to the destination folder. It often happens when restoring a backup from a different server.

Can I fix error 1419 without restarting SQL Server?

Yes, in most cases you only need to correct the file system permissions. A restart is not required, though it can help if permissions were changed while the service was running.

Does the SQL Server service account need sysadmin rights to restore a database?

No, the service account does not need sysadmin rights within SQL Server for file access. However, the login performing the restore must have the appropriate SQL Server permissions (e.g., dbcreator or sysadmin). File access is separate and depends on the Windows service account.

Why does the error mention "remote copy of database"?

The message is a standard SQL Server error that appears when the backup file is not locally accessible or the service account cannot open it. It does not necessarily mean the database is remote; it refers to the backup file being treated as a remote copy from the perspective of the restore process.

Can I restore a backup from a network share directly?

Yes, but the SQL Server service account must have read access to the share and the file. It is often simpler to copy the backup locally first.

What if I don't know the service account name?

You can find it in SQL Server Configuration Manager or in the Services console (services.msc) under the Log On As column for the SQL Server service.