SQL Server is a Relational Database Management system(RDBMS) developed by Microsoft. SQL Server consists of two major components namely Database Engine and SQLOS. Along with the creation and execution of triggers Database Engine also processes queries and manages Database fields. SQLOS provides services like synchronization and exception handling. In this article, we will show you the steps for installing SQL Server on MacOS.
Downloading and Installation of SQL Server Agent on MacOS
Follow the further steps to install SQL Server Agent on MacOS,
Step 1: Download the Docker from their official website. As per the configuration of your, Mac download either an Intel chip or M1 Docker.
Step 2: Open the .dmg file by double-clicking on it and start the installation process. Once it is done drag the Docker icon into the applications folder.
Step 3: Open the Docker application and click on the Docker icon in the menu bar and select Preferences.
Step 4: Click on the Resource tab and increase the Memory limit to 4 GB (In case the default value is not 4 GB) and click on Apply & restart.
Step 5: Now Open Terminal and run the following command and authenticate.
sudo docker pull mcr.microsoft.com/mssql/server:2019-latest
Step 6: Launch the SQL server image in Docker by running the following command.
docker run -d –name my_sql_server -e ‘ACCEPT_EULA=Y’ -e ‘SA_PASSWORD=myPassword123’ -p 1433:1433 mcr.microsoft.com/mssql/server:2019-latest
In the above command we have used “my_sql_server” and “myPassword123” as the name and password of our SQL server you can write any name and password of your choice.
Step 7: For installing command line tools run the following command
sudo npm install -g sql-cli
Note: You must have Node.js installed on your mac.
Step 8: Finally for connecting to the SQL server run the following command
mssql -u sa -p myPassword123