---
title: "Copy a SQL Server Database From a Server to Your Mac"
description: "Copy a SQL Server database into Docker on your Mac: BACPAC with SqlPackage, Clone Database, or backup and restore, tested with AdventureWorks2022."
url: "https://jamsql.com/blog/2026-11-10-copy-sql-server-database-to-mac/"
html_url: "https://jamsql.com/blog/2026-11-10-copy-sql-server-database-to-mac/"
generated: "2026-11-17T22:27:06.465Z"
---

Published: 2026-11-10

# Copy a SQL Server Database From a Server to Your Mac

To get a working copy of a database that lives on a server into SQL Server in Docker on your Mac, you have three routes. Export a **BACPAC** (schema and data in one file) from the Mac with SqlPackage and import it into the container; this needs nothing but a login that can read the database, and it also works for Azure SQL Database, which has no `BACKUP` statement. Use a **clone** feature in a Mac client, which does the same export and import in one step. Or take a `COPY_ONLY` **backup** if you can reach the server’s file system, copy the `.bak` over and restore it. SSMS’s Copy Database Wizard is not an option on a Mac. We copied AdventureWorks2022 (272 MB) all three ways on November 10, 2026: the BACPAC export took 11 seconds and produced 17.8 MB, the import into a stock SQL Server container failed because the image has no Full-Text Search, and with Full-Text Search added the import took 52 seconds and every table matched. Below are the commands, the errors and the fix. We ran everything on a Linux x86-64 machine with SQL Server in Docker; the Mac-only parts are marked and sourced.

## Why BACKUP DATABASE TO DISK won’t put the file on your Mac

The first thing most people try is a backup to a path on their own machine. The path in `BACKUP … TO DISK` is opened by the SQL Server service, on the server. Our “server” was SQL Server 2025 in a Linux container, and two Mac-style paths gave two different results, neither of them a file on the client:

```sql
BACKUP DATABASE AdventureWorks2022
TO DISK = N'/Users/me/Downloads/AdventureWorks2022.bak' WITH COPY_ONLY;
```

```
Processed 25384 pages for database 'AdventureWorks2022', file 'AdventureWorks2022' on file 1.
Processed 2 pages for database 'AdventureWorks2022', file 'AdventureWorks2022_log' on file 1.
BACKUP DATABASE successfully processed 25386 pages in 0.118 seconds (1680.713 MB/sec).
```

It succeeded, and the file was inside the server’s container at `/var/opt/mssql/.system/profiles/me/Downloads/AdventureWorks2022.bak`: SQL Server on Linux mapped the `/Users` path to a folder of its own. A Windows-style `C:\Users\me\Downloads\AdventureWorks2022.bak` went to the same file. A path under `/Volumes`, where a Mac mounts external disks, failed:

```
Msg 3201, Level 16, State 1, Line 1
Cannot open backup device '/Volumes/Backup/AdventureWorks2022.bak'. Operating system error 5(Access is denied.).
Msg 3013, Level 16, State 1, Line 1
BACKUP DATABASE is terminating abnormally.
```

Either way the backup stays on the server. To end up with a file on the Mac, a tool on the Mac has to read the data over the connection and write the file locally (a BACPAC), or someone has to copy the `.bak` off the server afterwards.

## The Windows-only tools (as of November 2026)

-   **SSMS.** The [SSMS FAQ](https://learn.microsoft.com/en-us/ssms/faq) answers “Does SSMS run on macOS?” with “No. SSMS is available only for Windows.” Its [Tasks → Export Data-tier Application](https://learn.microsoft.com/en-us/sql/tools/sql-database-projects/concepts/data-tier-applications/export-bacpac-file) and [Import Data-tier Application](https://learn.microsoft.com/en-us/sql/tools/sql-database-projects/concepts/data-tier-applications/import-bacpac-file-create-new-database) wizards are the BACPAC steps below with a GUI.
-   **The Copy Database Wizard** is launched “in SQL Server Management Studio”, needs SQL Server Agent started on the destination server, and “is not available in the Express edition” ([Microsoft Learn](https://learn.microsoft.com/en-us/sql/relational-databases/databases/use-the-copy-database-wizard)). Microsoft’s [overview of copying databases to other servers](https://learn.microsoft.com/en-us/sql/relational-databases/databases/copy-databases-to-other-servers) lists two methods: that wizard and restoring a backup.
-   **Azure Data Studio**, which had a BACPAC wizard on macOS, “is retired as of February 28, 2026” ([Microsoft’s retirement page](https://learn.microsoft.com/en-us/sql/tools/whats-happening-azure-data-studio)). That page points BACPAC import and export to the VS Code MSSQL extension and the SqlPackage CLI.
-   **The VS Code MSSQL extension** runs on macOS. Its [Data-tier Application page](https://learn.microsoft.com/en-us/sql/tools/visual-studio-code-extensions/mssql/mssql-data-tier-application) lists BACPAC export and import into “a new or empty database”, and its [backup](https://learn.microsoft.com/en-us/sql/tools/visual-studio-code-extensions/mssql/mssql-database-operations) writes to “a location accessible by the SQL Server instance”, which is the server again. We did not run the extension for this post.

## Which route fits

Route

You need

Watch out for

AdventureWorks2022, our run

BACPAC with SqlPackage

A login that can read the database; .NET on the Mac

Not consistent while others write; cross-database references refuse to export; full-text indexes need Full-Text Search on the target

Export 10.7 s, 17.8 MB; import 51.9 s

Clone Database (Jam SQL Studio)

Connections to both servers in the app

Same as BACPAC (it is one); 1 GB per database in the free Personal mode

56 s, export and import together

`COPY_ONLY` backup and restore

Permission to back up, and a way to copy the file off the server

The container must be the same SQL Server version or newer; not available on Azure SQL Database

200 MB `.bak` in 0.12 s, 50 MB compressed

All three were run against the same source: `AdventureWorks2022` restored from Microsoft’s sample backup onto SQL Server 2025 RTM-CU10 (17.0.5035.5) in a container we called the server. It has 71 tables, 760,837 rows, three full-text indexes, and 272 MB of data and log files (213 MB used). The local SQL Server was a second container from the same `mcr.microsoft.com/mssql/server:2025-latest` image. Setting that up on an Apple-silicon Mac, where the image runs under Rosetta, is covered in [How to Run SQL Server on a Mac](/blog/sql-server-on-macos/). After each copy we compared the row count of every table with the source.

## 1\. A BACPAC with SqlPackage

SqlPackage is Microsoft’s command-line tool for BACPAC and DACPAC files. Its [download page](https://learn.microsoft.com/en-us/sql/tools/sqlpackage/sqlpackage-download) lists version 170.5.96 (September 15, 2026), macOS 14 Sonoma or later, and installation as a .NET tool, which needs the .NET SDK (Mac-specific; we installed the same package on Linux):

```
dotnet tool install -g microsoft.sqlpackage
```

The tool needed a current .NET runtime: with .NET 10.0.10 installed it refused to start with “You must install or update .NET to run this application” and asked for `Microsoft.NETCore.App` 10.0.11. After installing the latest .NET 10 runtime it ran. Then export, from the Mac, to a file on the Mac:

```
sqlpackage /Action:Export /TargetFile:AdventureWorks2022.bacpac \
  /SourceConnectionString:"Server=sql.example.com,1433;Database=AdventureWorks2022;User ID=<login>;Password=<password>;TrustServerCertificate=True"
```

```
Connecting to database 'AdventureWorks2022' on server 'localhost,14471'.
Extracting schema
…
Processing Table '[Production].[Location]'.
Successfully exported database and saved it to file '…/AdventureWorks2022.bacpac'.
Time elapsed 0:00:10.72
```

10.7 seconds and 17,760,045 bytes for a database with 213 MB in use; a BACPAC is a zip file of the schema and the table data, without indexes’ pages or free space. `TrustServerCertificate=True` was for our container’s self-signed certificate; leave it out for a server with a certificate your Mac trusts. Our test server listened on port 14471, which is why that number shows in the output.

Two things to know before you rely on the file:

-   **It is not a snapshot.** Microsoft’s [Export reference](https://learn.microsoft.com/en-us/sql/tools/sqlpackage/sqlpackage-export): “For an export to be transactionally consistent, you must ensure either that no write activity is occurring during the export, or that you’re exporting from a transactionally consistent copy of your database.” On a busy server, export from a restored copy or at a quiet time.
-   **The database must be self-contained.** We added a view that joins to `AdventureWorks2022.Person.Person` from another database and exported that database:

```
*** Error exporting database:One or more unsupported elements were found in the schema used as part of a data package.
Error SQL71561: Error validating element [dbo].[OrderPeople]: View: [dbo].[OrderPeople] has an unresolved reference to object [AdventureWorks2022].[Person].[Person]. External references are not supported when creating a package from this platform.
(five more SQL71561/SQL71501 errors for the view's columns)
```

Nothing was written. Remove or rewrite such objects in a copy of the database, or use a backup instead, which copies the database as it is.

Import into a new database in the local container. Import needs a new or empty database; a database with user objects in it is refused with SQL71659, shown in [our restore post](/blog/2026-11-09-restore-sql-server-bak-docker-mac/#bacpac):

```
sqlpackage /Action:Import /SourceFile:AdventureWorks2022.bacpac \
  /TargetConnectionString:"Server=localhost,1433;Database=AdventureWorks2022;User ID=sa;Password=<password>;TrustServerCertificate=True"
```

## Msg 7609: the container has no Full-Text Search

Into the stock `2025-latest` container, the import failed after 20.5 seconds:

```
*** Error importing database:Could not import package.
Error SQL72014: Core Microsoft SqlClient Data Provider: Msg 7609, Level 17, State 5, Line 2 Full-Text Search is not installed, or a full-text component cannot be loaded.
Error SQL72045: Script execution error.  The executed script:
CREATE FULLTEXT INDEX ON [HumanResources].[JobCandidate]
    ([Resume] LANGUAGE 1033)
    KEY INDEX [PK_JobCandidate_JobCandidateID]
    ON [AW2016FullTextCatalog];
```

`SELECT FULLTEXTSERVICEPROPERTY('IsFulltextInstalled')` returns 0 in that image. The failed import left a database behind with 70 tables and no rows, so drop it before you try again. We found no Microsoft Learn page that says the images lack it; the request “Provide Linux images with full-text search included” has been open in the image’s repository since 2021 as [mssql-docker #681](https://github.com/microsoft/mssql-docker/issues/681). Any database with a full-text index will hit this, whichever tool does the import.

The [Full-Text Search on Linux page](https://learn.microsoft.com/en-us/sql/linux/install-upgrade/setup-full-text-search) installs the `mssql-server-fts` package. Microsoft’s container documentation links a [Dockerfile example](https://learn.microsoft.com/en-us/sql/linux/containers/configure) built on Ubuntu 16.04 and SQL Server 2017, so we wrote one for the current image. The image already contains Microsoft’s package signing key, and its Ubuntu 24.04 base needs the 2025 package list:

```
FROM mcr.microsoft.com/mssql/server:2025-latest
USER root
RUN apt-get update \
 && apt-get install -y --no-install-recommends curl ca-certificates \
 && curl -fsSL https://packages.microsoft.com/config/ubuntu/24.04/mssql-server-2025.list \
      -o /etc/apt/sources.list.d/mssql-server-2025.list \
 && apt-get update \
 && apt-get install -y --no-install-recommends mssql-server-fts \
 && rm -rf /var/lib/apt/lists/*
USER mssql
```

```
docker build --platform linux/amd64 -t mssql-fts:2025 .
docker run -d --name sql2025fts -e ACCEPT_EULA=Y -e 'MSSQL_SA_PASSWORD=<YourStrong@Passw0rd>' \
  -p 1433:1433 mssql-fts:2025
```

The build took 75 seconds here. It installs `mssql-server` and `mssql-server-fts` 17.0.5035.5-3 from Microsoft’s repository, the same build as the CU10 image, which takes the image from 2.4 GB to 5.0 GB on disk. `apt-get` installs whatever version is newest in Microsoft’s repository at build time, so rebuild with `--pull` when you want a newer cumulative update. In the new container `IsFulltextInstalled` returned 1, and the same import finished in 51.9 seconds, with every one of the 71 tables holding the same number of rows as the source and `CONTAINS` queries working on the three full-text indexes. On an Apple-silicon Mac the `RUN` step runs under the same x86-64 emulation as SQL Server itself; we built and ran it on Linux, not on a Mac.

## 2\. Clone Database in Jam SQL Studio

Clone Database does the export and the import in one step: it writes the BACPAC to a temporary file on your Mac and imports it into the target connection, through the SQL Tools Service that ships with the app. Nothing has to be installed besides the app.

### Get a client on the Mac

Jam SQL Studio has separate Apple Silicon and Intel builds for macOS 11 Big Sur or later. Run `uname -m` in Terminal if you are not sure: `arm64` means Apple Silicon.

[Download for Mac (Apple Silicon & Intel)](/download/mac/) [Clone Database guide](/docs/clone/)

### Steps

1.  Add both servers. For each, click **New Connection**, choose **SQL Server**, enter the server, port, *SQL Server authentication*, login and password, and click **Save**; the app tests the connection before it saves it. Then click **Connect** on the saved connection. For the local container that is `localhost`, port 1433 and `sa`; **Trust server certificate** is on by default, which its self-signed certificate needs.
2.  In Object Explorer, right-click the database on the server and choose **Clone Database…**.
3.  Pick the **Target Connection** (only SQL Server connections are listed) and type the **New Database Name**. For SQL Server, **Include data** is always on, because the clone is a BACPAC; **Include security objects** copies users, roles and permissions in a separate step; we left it off.
4.  Click **Clone**. A progress dialog shows the elapsed time.

![Jam SQL Studio Clone Database dialog: source AdventureWorks2022 on Company SQL Server, target connection Docker on this Mac, new database name AdventureWorks2022, Include data checked and greyed out with the note that SQL Server cloning uses a BACPAC export and import, and Include security objects unchecked](/images/docs/clone-database-to-local-docker.png)
*Clone Database from the server connection to the container on the Mac.*

Into the stock container the clone failed after 33 seconds, for the full-text reason above. The dialog shows what the server reported: “Import failed: Could not import package.”, then `Msg 7609, Level 17, State 5, Line 2 Full-Text Search is not installed, or a full-text component cannot be loaded.` and the `CREATE FULLTEXT INDEX` statement that failed. As with SqlPackage, the import left a database on the target, with 70 tables and no rows. The dialog names it and the connection it is on, and offers **Drop database…**:

![Jam SQL Studio Clone Failed dialog for AdventureWorks2022 after 33 seconds: Import failed: Could not import package., Msg 7609 Full-Text Search is not installed, and the failed CREATE FULLTEXT INDEX statement, with a Copy error button; below it a notice that a partly created database named AdventureWorks2022 was left on Docker on this Mac, with a Drop database button](/images/docs/clone-database-fulltext-error.png)
*Cloning into the stock container: the server’s Msg 7609, the failed statement, and the partly created database the clone left.*

**Drop database…** opens the same confirmation as any destructive statement, showing the connection, the database and the statement it will run, `ALTER DATABASE [AdventureWorks2022] SET SINGLE_USER WITH ROLLBACK IMMEDIATE; DROP DATABASE [AdventureWorks2022];`. The database is dropped only when you confirm with **Execute Anyway**; if you close the dialog instead, it stays on the target, and you have to drop it before you clone again under the same name.

Into the container with Full-Text Search the clone finished in 56 seconds, export and import together, and all 71 tables had the source’s row counts. The dialog says what it created:

![Jam SQL Studio Clone Complete dialog for AdventureWorks2022: Clone completed successfully, elapsed time 56 seconds, and the sentence Created the database "AdventureWorks2022" with the schema and data of "AdventureWorks2022"., with a Done button](/images/docs/clone-database-to-local-done.png)
*The clone into the container with Full-Text Search, finished.*

In the free Personal mode Clone Database works on databases up to 1 GB, measured as the allocated size of the data and log files (272 MB here); there is no per-table row limit, and `Sales.SalesOrderDetail` with its 121,317 rows was copied in Personal mode. The 100,000-row limit applies to Clone Table, which copies a single table. Personal mode is for personal, non-commercial use; work use needs Pro, which removes both limits ([pricing](/pricing/)).

## 3\. Backup and restore, when you can reach the server’s disk

If you, or a DBA, can get a file off the server, a backup is the fastest and most faithful copy: it holds the database’s own pages, and per [Microsoft](https://learn.microsoft.com/en-us/sql/relational-databases/backup-restore/full-database-backups-sql-server) “Full database backups represent the database at the time the backup finished.” Use `COPY_ONLY` so that the backup does not get in the way of the server’s own backup schedule; per [Microsoft](https://learn.microsoft.com/en-us/sql/relational-databases/backup-restore/copy-only-backups-sql-server), a copy-only full backup “can’t serve as a differential base or differential backup and doesn’t affect the differential base.”

```sql
BACKUP DATABASE AdventureWorks2022
TO DISK = N'/var/opt/mssql/backup/aw-copy.bak'
WITH COPY_ONLY, COMPRESSION;
```

Without `COMPRESSION` the file was 209,838,080 bytes, written in 0.12 seconds; with it, 52,514,816 bytes in 0.20 seconds. Both belonged to the `mssql` user with mode `0660`. For a server in Docker, `docker cp` copies the file out; for any other server, copy it however your team allows. The restore on the Mac, including `RESTORE FILELISTONLY`, `WITH MOVE` for a backup taken on Windows and the permission errors, is in [Restore a SQL Server .bak into Docker on an Apple Silicon Mac](/blog/2026-11-09-restore-sql-server-bak-docker-mac/). Two limits apply here: a backup cannot be restored onto an older SQL Server ([error 3169](/blog/2026-11-09-restore-sql-server-bak-docker-mac/#error-3169)), so the container has to be the server’s version or newer, and you cannot run `BACKUP` against Azure SQL Database. Microsoft’s [T-SQL differences page](https://learn.microsoft.com/en-us/azure/azure-sql/database/transact-sql-tsql-differences-sql-server) lists “syntax for backup, restore” among what Azure SQL Database does not support, and its [export page](https://learn.microsoft.com/en-us/azure/azure-sql/database/database-export) points to a BACPAC for “moving to another platform”.

Jam SQL Studio’s **Backup Database (.bak)…** and **Restore Database (.bak)…** dialogs run the same statements and browse the server’s folders, not the Mac’s. In Personal mode, creating a backup is limited to databases up to 1 GB; restoring has no limit.

## Quick Answers

### Q: Why doesn't BACKUP DATABASE TO DISK save the file on my Mac?

A: The path in BACKUP ... TO DISK is opened by the SQL Server service on the server, not by your client. On SQL Server 2025 on Linux, a path such as /Users/me/Downloads/db.bak even succeeded and wrote the file into a folder inside the server's container, and /Volumes/Backup/db.bak failed with Msg 3201 and operating system error 5. To get a file onto your Mac, export a BACPAC from the Mac, or copy the .bak off the server afterwards.

### Q: How do I copy a SQL Server database to my local machine without access to the server's disk?

A: Export a BACPAC from your machine with SqlPackage (sqlpackage /Action:Export with a SourceConnectionString), then import it into your local SQL Server with sqlpackage /Action:Import. A BACPAC holds the schema and the data, needs only a login that can read the database, and works for Azure SQL Database, which has no BACKUP statement. A client with a clone feature does both steps for you.

### Q: Why does importing a BACPAC into SQL Server in Docker fail with Msg 7609?

A: Msg 7609 means Full-Text Search is not installed. The mcr.microsoft.com/mssql/server images do not include it, so a database with full-text indexes, such as AdventureWorks, fails at CREATE FULLTEXT INDEX and leaves a half-created database. Build an image that adds the mssql-server-fts package, drop the partial database, and import again. When Clone Database in Jam SQL Studio fails this way, its dialog names the partial database and offers to drop it.

### Q: Can I use the SQL Server Copy Database Wizard on a Mac?

A: No. The Copy Database Wizard runs in SQL Server Management Studio, which Microsoft says is available only for Windows, and it needs SQL Server Agent running on the destination server; it is not available in the Express edition. On a Mac, use a BACPAC with SqlPackage, a clone feature in a Mac client, or a backup and restore.

### Q: Is a BACPAC export a consistent copy of the database?

A: Only if nothing writes to the database while it runs. Microsoft says an export is transactionally consistent only when no write activity is occurring during the export, or when you export from a transactionally consistent copy of the database. A COPY\_ONLY backup is consistent to the moment it finishes.

### Q: What does SQL71561 'External references are not supported' mean when exporting a BACPAC?

A: An object in the database, typically a view, refers to another database by a three-part name such as OtherDb.dbo.Table. A BACPAC has to be self-contained, so SqlPackage refuses to export it. Remove or change those objects in a copy of the database before exporting, or use a backup and restore, which copies the database as it is.

## How we tested

All commands ran on November 10, 2026 on an x86-64 Linux machine with Docker, in throwaway containers that we removed afterwards: `mcr.microsoft.com/mssql/server:2025-latest`, which that day was SQL Server 2025 RTM-CU10 (17.0.5035.5), once as the source server, once as the stock local server, and once rebuilt with Full-Text Search. The source database was Microsoft’s `AdventureWorks2022.bak`. SqlPackage 170.5.96 was the .NET tool, run on the .NET 10.0.14 runtime. Copies were checked by comparing every table’s row count with the source. The Jam SQL Studio runs used a test build of the current code in Personal mode, against containers from the same images; the screenshots come from those runs. Timings are single runs on one machine. We did not run any step on a Mac: the SqlPackage install, the Apple-silicon notes and the VS Code extension are from the vendor pages linked above.

## Summary

A backup path on your Mac is a path on the server, so a `.bak` will not land on your machine by itself. Export a BACPAC from the Mac with SqlPackage and import it into the container, or let a client clone the database for you; both need a container with Full-Text Search if the database has full-text indexes, and both refuse databases that reference other databases. When you can get a file off the server, a `COPY_ONLY` backup is faster and copies everything, and the restore is the same as for any other `.bak`.

Last verified against learn.microsoft.com and github.com/microsoft/mssql-docker, and by running every command and statement on SQL Server 2025 CU10, on 2026-11-10.

### Clone a SQL Server database to the container on your Mac

Jam SQL Studio copies a database from one SQL Server connection to another with Clone Database, and restores `.bak` files into a container. Native builds for Apple Silicon and Intel.

[Download for Mac](/download/mac/) [Clone Database guide](/docs/clone/)

### Related

-   [Restore a .bak in Docker on a Mac](/blog/2026-11-09-restore-sql-server-bak-docker-mac/)
-   [Clone Database Guide](/docs/clone/)
-   [Backup and Restore Guide](/docs/backup-restore/)
-   [Import a CSV into SQL Server on a Mac](/blog/2026-11-10-import-csv-into-sql-server-mac/)
-   [How to Run SQL Server on a Mac](/blog/sql-server-on-macos/)

## Copy a SQL Server database to your Mac with Jam SQL Studio

Jam SQL Studio runs natively on Apple silicon and Intel Macs. **Clone Database** copies a SQL Server database from one connection to another, for example from a server to the container on your Mac, with schema and data in one step. Free for personal use for databases up to 1 GB.

[Download Jam SQL Studio Free](/download/) [Clone Database guide](/docs/clone/)

Free for personal use • No account required • Mac, Windows, Linux

![Jam SQL Studio Clone Database dialog copying AdventureWorks2022 from the Company SQL Server connection to the Docker on this Mac connection](/images/docs/clone-database-to-local-docker.png)