Beekeeper Studio is an open source SQL Editor and database manager, you can use Beekeeper Studio to query and manage your relational databases, like MySQL, Postgres, SQLite, and SQL Server. Their mission is to improve technology accessibility by providing a free and open SQL editor and database manager that is full-featured and easy to use. SQL Server 2019 Express is a free edition of SQL Server, ideal for development and production for desktop, web and small server applications. Connect with user groups and data community resources related to SQL Server, Azure Data and diversity and inclusion. Download the latest from Windows, Windows Apps, Office, Xbox, Skype, Windows 10, Lumia phone, Edge & Internet Explorer, Dev Tools & more. Use Table Designer to design a new table, modify existing table, or quickly add new or modify existing columns, constraints and indexes. You don’t need to write the complex code to alter affected indexes, views, procedures and functions – Visual Studio writes the change script for you.
Are you wondering if you can use Microsoft SQL Server on Mac?
Are you also wondering if you can use SQL Server Management Studio (SSMS)?
In this quick article, I will do a demo of I you can use MS SQL Server for development.
Step 1: Install Docker Client on Mac
You need to use Docker in order to use SQL Server. If you’re new to Docker and containers, this is a good place to know what it is and what it is for. https://www.docker.com/resources/what-container
Here’s the guide on how to install Docker Client on Mac.
Then also install Docker Compose. Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application’s services. Then, with a single command, you create and start all the services from your configuration.
I prefer a Docker Compose over a Docker file.
Step 2: Create a Docker Compose and run it
Copy and paste this into a docker-compose.yml file (you have to create this file)
Then go to your terminal and run the file. It has to be inside a folder and you need to navigate to that folder using your terminal. Then run this (without the dollar sign).
$ docker-compose upGo to the dashboard of your Docker Client to see check if the container is running.
Step 3: Install Azure Data Studio
There’s no SSMS for Mac but you can use Azure Data Studio to manage SQL Server. Here’s where you can install it.
Azure Data Studio seems like Visual Studio Code. It is lightweight and it is easy to use.
Step 4: Connect Azure Data Studio to SQL Server Container
Now use the Azure Data Studio and login to the database using the credentials in the docker-compose file.
Free Sql Server Client For Mac Update
Step 5: Using a backfile
Let’s restore a sample database from Microsoft. The good old AdventureWorks.
Before we proceed to restore, let’s move the AdventureWorks file first to the container’s file system. Run these commands.
$ docker ps
$ docker cp [locationOfBakFile] [containerId:msssqlserverContainerFS]
Run docker ps to see all running containers the get the container ID. You’ll need that in the next command because that locates the directory where you will move the bak file in the container.
Step 5: Restore Data or Create Database
Sql Tool For Mac
Now we can restore the AdventureWorks. Click the Restore button.
Click restore from. Pick Backup file. Then choose Database
Click the Files tab. Check the Relocate all files.
Sql Database For Mac
Then finally click Restore.
Now you have the AdventureWorks in Azure Data Studio plus you can start creating your own database and tables.
Click new query then create new database
That’s it. Now you can use the database you created or the AdventureWorks in your ASP.NET Core.
And if you want to delete a database, here’s the query that you need to run.
Make sure you run the query in the database you want to delete.
Until next time. Peace out!