07/23/2026
by Marlon Ribunal
0 comments

Getting Started with Azure SQL Developer on Macbook

No, this is not the SQL Server Developer Edition. This is something new (as of the time of writing). Well, it’s like the Developer Edition that you’ve all been familiar with in all the SQL Server versions. This Developer edition is for the cloud-only, PaaS Azure SQL Database. And, yeah, we would like to thank Microsoft for this!

The idea behind Azure SQL Developer is for anyone to build, iterate, and test locally at no cost. This means NO Azure subscription to deal with and NO credit card required! Everything will work seamlessly when you deploy your application to an Azure SQL Database backend!

It’s exactly like the SQL Server Developer Edition that we all love. As of this writing, it’s in Private Preview. And I got the chance to get into the preview program.

I’d like to build something on top of Azure SQL Developer. But for now, let’s set it up on my dev environment:

Laptop: Macbook Pro M5 Pro
Code Editor: Zed 1.11.3
Terminal: iTerm2
Container App: OrbStack (my preferred container app on mac)
Database: Local Azure SQL Developer container
AI Coding Agent: Claude Code Max 5x

By the way, same steps should apply to Windows.

Authenticate to the Preview Registry

Like I said, Azure SQL Developer is currently in Private Preview. I was given a user and password to authenticate to the registry to pull the latest image.

Zsh
docker login sqldbpreview-dpgaeqhmgphzd4bk.azurecr.io -u private-preview-reader

Input the password that was sent to you when you get admitted to the private preview. Hopefully, pulling the image would be much more convenient when this goes public.

You should get a Login Succeeded message.

Pull the Azure SQL Developer image and deploy container

Let’s pull the image and deploy the Azure SQL Developer container to OrbStack.

Zsh
docker run --platform linux/amd64 -e ACCEPT_EULA=Y -e MSSQL_SA_PASSWORD='YourStrongPassword' -p 1433:1433 --name azuresqldb --hostname azuresqldb -d sqldbpreview-dpgaeqhmgphzd4bk.azurecr.io/azure-sql/db-dev:latest

Normally, I would pull the image first then deploy. But you can also directly deploy and docker should be able to pull the image first (duh).

Test connection to our local Azure Database Developer

Let’s send a query to the database to make sure we can establish a connection to it.

Zsh
docker exec azuresqldb /opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P 'YourStrongPassword' -C -Q 'SELECT @@VERSION;'

And if you’ve followed the steps correctly, you should now be able to connect to the local version of Azure SQL Database.

As of this writing, as you can see in the screenshot below, the current version of Azure SQL Database Developer is 12.0.2000.8, July 12, 2026

Enjoy! I’ll build something on top of this. Come back for that later!

07/20/2026
by Marlon Ribunal
0 comments

Restore SQL Server Database to an OrbStack Container

In the previous post, we’ve built a SQL Server 2025 sandbox in an OrbStack container in a Macbook. If you are like me who switched from a Windows laptop to MacBook, you are probably missing your SQL Server. Sometimes it’s just nice to have a sandbox that is separate from your all other instances for testing and learning. This is exactly what we’re trying to do here.

Download the Backup

For this exercise we want to download the full backup of Wide World Importers. Go ahead and download it from the github repo which you can find it here. And of course, take note of where you saved the .bak file.

Copy the Backup File into the Container

First, let’s create our backup directory in our cotainer. From your favorite terminal, run the following:

ShellScript
docker exec -it sql2025 mkdir -p /var/opt/mssql/backup

Then copy over the file to the directory we just created above

ShellScript
docker cp /Users/marlonribunal/Downloads/WideWorldImporters-Full.bak sql2025:/var/opt/mssql/backup/

You terminal should now say that the backup file was successfully copied.

Use VS Code to Restore the Database

Since Microsoft will never ever port SSMS to the macOS, I think VS Code with the mssql extension is a pretty much decent tool for doing work in a SQL Server.

Check the in-memory data, database, and log files contained in the backup, so we know what logical files to map to their physical paths in the container:

SQL
RESTORE FILELISTONLY
FROM DISK = N'/var/opt/mssql/backup/WideWorldImporters-Full.bak';
GO

You should see all the contained in the backup file of the WideWorldImporters database. Take note of those for the next step.

Then restore the database. Please take note that if you don’t map the path of the files to where you want to store them, the restore proccess will assume that you are restoring the files into the same directory the backup files were stored in the source. Chances are you will then get an error because those original directory don’t exist in the target container.

SQL
RESTORE DATABASE [WideWorldImporters]
FROM DISK = '/var/opt/mssql/backup/WideWorldImporters-Full.bak'
WITH 
MOVE 'WWI_Primary' TO '/var/opt/mssql/data/WideWorldImporters.mdf',
MOVE 'WWI_UserData' TO '/var/opt/mssql/data/WideWorldImporters_UserData.ndf',
MOVE 'WWI_Log' TO '/var/opt/mssql/data/WideWorldImporters_Log.ldf',
MOVE 'WWI_InMemory_Data_1' TO '/var/opt/mssql/data/WideWorldImporters_InMemory_Data_1',
REPLACE;
GO

That took about 8 seconds to complete in my container:

That’s it! Enjoy querying!

07/16/2026
by Marlon Ribunal
0 comments

Do This Before You Contact Your SQL Server Consultant

Say you need outside help. You’ve exhausted all the things that you could do and, still, nothing works. So, you decide that calling in for help is the next sensible thing to do. Let’s say this is the first time you’re asking for somebody’s help. You decide which consultant to work with. The hardest part, if you’re doing this for the first time, is how to start that conversation.

The first conversation is the most critical one. Obviously, you cannot just turn over your SQL Server instance and wait for the bill. Some prep changes what you get out of that first conversation. It means spending less time covering the basics and more time focusing on the problem that made you pick up the phone in the first place.

Here’s what’s worth having ready before you make the call.

(And, not incidentally, if you are a new SQL Server DBA hire, you can use the following to get a baseline understanding of the environment you’re now facing.)

Determine what’s wrong with your server

Here’s the thing. Your consultant is a highly technical person, but you don’t always have to speak in technical terms. Explain the pain points from the users’ perspective. Is the UI slow? Are users experiencing timeout issues? Is a button not responding in a timely manner? Look at the problem through the users’ eyes and understand their pain.

An important thing to take note of is what feels slow or broken. Is it specific like a report? A batch job that has been failing to meet the SLA? Is it the whole application? Ingestion pipeline failing to finish at all?

Another important thing to take note of is the timeline. When did this start happening? Is it after a vendor update? Is it after releasing a new ingestion tool? After a SQL patch? After a migration? After a new hire?

Also, I’d add who is feeling the pain and who is affected the most. Maybe it’s one or two people in the Accounting department. Maybe it’s the CFO trying to run a quarterly report. Or perhaps it’s your customers or partners who rely on access to your data outside your company.

That gives the consultant some context to work with.

You know your business better than any consultant walking through the door. That context is where a good diagnosis starts.

Understand your data landscape

You don’t have to know every nook and cranny of your SQL Server environment, whether it’s running on-prem or in the cloud. But you should have a baseline understanding of how things are put together.

Things like SQL Server versions and editions, if you know them, can provide useful information about your environment. Have an approximate idea of how many servers are affected, or maybe the percentage compared to the total number of servers. Is the issue only happening on your on-prem servers, or are your cloud instances affected as well?

Those are a few important things for the consultant to know as a starting point.

One thing worth checking first

If you check nothing else, check this: do your backups actually work? Or do you even have the right backup strategy in place?

If you don’t have RPO and RTO defined (or worse, don’t know what those mean), put that at the top of your discussion list with your consultant. This is one of the most important things you need to get right.

Not “is the backup job running?” That’s not the question. The real question is whether you have ever restored a backup and confirmed that it actually works.

A backup that has never been tested is just a hope, not a safety net.

Okay, somebody said that before. I’m just borrowing it here because it perfectly describes why testing your backups matters. 😉

If you’re not sure, that’s okay. That’s exactly the kind of thing you want to identify early. And honestly, it’s one of the first things I would want to understand as well.

Sort out access and ownership

Well, how can the consultant help if they don’t have the access level needed to do the work or accomplish what you brought them in to do?

Nothing slows down a first week like waiting on permissions. Before you bring anyone in, it helps to know who owns the SQL Server environment today (sa is the wrong answer). Who can grant the access they need? Does it require a chain of approvals from higher-ups? Or is it an open-for-all kind of thing? The consultant needs to know if it’s the latter.

If you’re on a tight schedule or everything is already on fire, you don’t want to delay troubleshooting and resolution just because of access issues.

If you’re technical, go deeper maybe

If you or someone on your team is hands-on, here’s the bigger picture a DBA would typically look at. None of this is required. It is just useful information to have if you can pull it together.

Hopefully, Query Store is enabled. And if you’re lucky, it has enough history captured that you can correlate the data with the actual issues you’re seeing.

Disk latency, specifically read/write latency, is another useful piece of information if you have it. Ideally, if you have results from CrystalDiskInfo or a similar disk benchmark, that can give the consultant an idea of what they’re dealing with when it comes to storage performance. Maybe storage is part of the problem.

Is TempDB configured according to known best practices? Is Instant File Initialization enabled? What about Lock Pages in Memory? How are MAXDOP and Cost Threshold for Parallelism configured?

What does the disk subsystem look like? Where are your data and log files stored? Are your system databases sitting on the OS drive? How much memory is allocated to SQL Server?

These are the kinds of details that can help a SQL Server consultant understand the environment before they start troubleshooting.

You may also want to run tools like Brent Ozar’s sp_Blitz or Glenn Berry’s SQL Server Diagnostic Queries. If those don’t mean anything to you, that’s okay. These are just examples of tools that can provide useful information to a SQL Server consultant.

Just be prepared

The best thing to remember is this: be prepared.

The better prepared you are, the less time is spent having someone learn your environment, and the sooner you can get to the actual problem.

Whether you work with an outside consultant or someone from your own team, walking in with your symptoms, your environment details, and the information you already have gives everyone a much better place to start.