This guide shows you how to use Docker to pull a MSSQL Server image and run it. Azure Data Studio is a cross-platform database tool that will be using to connect our Docker container with MSSQL and execute SQL statements.
At the end, I will show you how to import a database to the Docker file system so that you can access it through Azure Data Studio.
CNET Download provides free downloads for Windows, Mac, iOS and Android devices across all categories of software and apps, including security, utilities, games, video and browsers. SQLPro for MSSQL is the Premier application for editing and viewing SQL Server databases on mac os x. SQLPro for MSSQL. Download; Buy; A simple, powerful SQL Server manager for macOS Download Purchase (also available on the Mac App Store) Download. Intuitive interface. Coming from Microsoft SQL Management Studio? Our interface and workflow.
Check out other related guides here:
We will be touching on the technologies shown below:
- Database: Microsoft SQL Server
- Container to pull mssql-server-demo: Docker
- Installer for mssql-cli: Node.js (Run-time Environment) / Node Package Manager (NPM)
- Database tool and GUI: Azure Data Studio
Download and Install VirtualBox. The first step is to download VirtualBox from the VirtualBox.
Building our Environment with Docker
Installing Docker
Full guide for this portion here:
- Download Docker CE (Community Edition) for Mac here.
- To install, double-click on the .dmg file and then drag the Docker application icon to your Application folder.
What is Docker?
Docker is a platform that enables software to run in its own isolated environment. SQL Server (from 2017) can be run on Docker in its own isolated container.
Once Docker is installed, you simply download — or “pull” — the SQL Server on Linux Docker Image to your Mac, then run it as a Docker container. This container is an isolated environment that contains everything SQL Server needs to run.
Launch Docker
Open your Docker application, it should be located in the Applications folder.
Increase the Memory
By default, Docker will have 2GB of memory allocated to it. SQL Server needs at least 3.25GB. To be safe, increase it to 4GB if you can. Since this is just a playground, 2GB should be enough.
Optional - in case you want to increase memory size:
- Select Preferences from the little Docker icon in the top menu
- Slide the memory slider up to at least 2GB
- Click Apply & Restart
Download SQL Server
Open a Terminal window and run the following command.
This downloads the latest SQL Server 2019 for Linux Docker image to your computer.
You can also check for the latest container version on the Docker website if you wish.
Launch Docker Image
Run the following command to launch an instance of the Docker image you just downloaded:
Example output:
Check the Docker container (optional)
You can type the following command to check that the Docker container is running.
If it’s up and running, it should return something like this:
If you accidentally closed your Docker App, open your terminal and type
![Download Sql Server Management Studio Ssms For Mac Download Sql Server Management Studio Ssms For Mac](/uploads/1/2/6/5/126506438/427534793.png)
Install the Node.js and NPM
Check if you have Node.js and NPM. Run the following commands in your terminal.
If you get an output with a version number, skip the rest of this section.
Then visit the Node.js website by clicking the following link:
Click the LTS version (the version number may be various) download button to download the Node.js package:
Next click and run the package after downloading. MacOS and Windows will have different installation process. Please follow the instruction to install the Node.js.
Then test again if Node.js and NPM were installed successfully by running the following commands in the terminal:
An output should look like this:
Install sql-cli
Run the following command to install the sql-cli command line tool. This tool allows you to run queries and other commands against your SQL Server instance.
If you get a permission error, use the
sudo
command:Connect to MSSQL Server
Connect to your SQL Server using the mssql command, followed by the username and password parameters. Syntax: -u <username> -p <password>
Your output should look like this if you successfully connected:
Run a Quick Test
Run a quick test to check if you can connect to your SQL Server. Use the following SQL statement to check your SQL Server version:
If it’s running, you should see something like this:
Download an SQL Server GUI - Azure Data Studio
Azure Data Studio (formerly SQL Operations Studio) is a free GUI management tool that you can use to manage SQL Server on your computer. You can use it to create and manage databases, write queries, backup and restore databases, and more.
Azure Data Studio is available on Windows, Mac and Linux.
Install Azure Data Studio
To install Azure Data Studio onto your Mac:
- Visit the Azure Data Studio download page, and click the .zip file for macOS
- Once the .zip file has finished downloading, double click it to expand its contents
- Drag the .app file to the Applications folder (the file will probably be called Azure Data Studio.app)
Connect to SQL Server
Now that Azure Data Studio is installed, you can use it to connect to SQL Server.
- Launch Azure Data Studio. It is located in your Applications folder.
- Enter the login credentials and other information for the SQL Server instance that you’d like to connect to:
It should look similar to this:
It should look similar to this:
- Server Name: localhost, [port number]
Example: localhost, 1433 - Authentication Type: SQL Login
- User name: [your SQL Server username] or sa
- Password: [your SQL Server password] or reallyStrongPwd123
- Database Name: <default>
- Server Group: <default>
If you use a port other than the default 1433, click Advanced and enter it in the Port field.
Alternatively, you can append it to your server name with a comma in between. For example, if you used port 1400, type in localhost,1400.
You can now go ahead and create databases, run scripts, and perform other SQL Server management tasks.
- Click New Query
2. Type SELECT @@VERSION, then Click Run Query.
You should be able to see: Microsoft SQL Server in the Results.
Importing a sample database to your SQL Server using Azure Data Studio
Download the sample database file AdventureWorks
To get the OLTP downloads of AdventureWorks, go to this link and choose any sample database. In my example, I choose
AdventureWorks2017.bak
. We will upload this to the S3 Bucket.Copying the file to your docker
Type the following command in the terminal following this syntax:
It should look like this:
Sql Management Studio Download
If you forgot your container id, use the
docker ps
command.Importing the sample database in Docker
Download Sql Server Management Studio
Go to Azure Data Studio, and click the localhost, 1443, then choose Restore.
Then choose Backup file as the selection for Restore from. Next, click the blue button on the right of Backup file path.
Look for the sample database file. It should be located in
Choose Restore.
Check your localhost, 1443. It should generated a Database named AdventureWorks2017 and have contents such as Tables and Views. If not, right-click on localhost, 1443 and choose Refresh. You can also restart your Azure Data Studio application.
Testing the sample database
- Choose AdventureWorks2017 from the dropdown menu.
- Write a SQL query:
3. Click Run to run the query.
You should have an output like this:
Congratulations! ???
Resources:
Connect with me on LinkedIn here
Welcome to release 17.5 of SQL Server Management Studio (SSMS)!
See also full documentation of this release and previous releases.
Applicability
When you apply this update through Windows Server Update Services (WSUS), it is only applicable to earlier versions of SSMS 17.x. This package will fully upgrade any previous 17.x version.
Summary
Data Discovery and Classification:
- Added a new SQL Data Discovery and Classification feature for discovering, classifying, labeling, and reporting sensitive data in your databases.
- Auto-discovering and classifying your most sensitive data (business, financial, healthcare, PII, and so on) can play a pivotal role in your organizational information protection stature.
- Learn more at SQL Data Discovery and Classification.
Query Editor:
- Added support for the SkipRows option to the Delimited Text External File Format for Azure SQL Data Warehouse. This capability allows users to skip a specified number of rows when they load delimited text files into SQL Data Warehouse. Also added the corresponding intellisense and SQL Server Management Objects (SMO) support for the FIRST_ROW keyword.
Showplan:
- Enabled the display of the estimated plan button for SQL Data Warehouse.
- Added a new showplan attribute EstimateRowsWithoutRowGoal; And added new showplan attributes UdfCpuTime and UdfElapsedTime to QueryTimeStats. For more information, see Optimizer row goal information in query execution plan added in SQL Server 2017 CU3.
Update information
The following update is available for download from the Microsoft Download Center:
Download the update now
For more information about how to download Microsoft support files, click the following article number to view the article in the Microsoft Knowledge Base:
Download the update now
For more information about how to download Microsoft support files, click the following article number to view the article in the Microsoft Knowledge Base:
119591 How to obtain Microsoft support files from online services
Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help prevent any unauthorized changes to the file.
Bug fixes
Showplan:
- Fixed the Live Query Statistics (LQS) elapsed time to show the engine execution time instead of time that's elapsed for the LQS connection.
- Fixed an issue in which showplan was not able to recognize Apply logical operators such as GbApply and InnerApply.
- Fixed an issue that's related to ExchangeSpill.
Query Editor:
- Fixed an issue that's related to SPIDs in which SSMS could throw an error message that resembles 'Input string was not in a correct format. (mscorlib)' when you run a simple query that's preceded by a 'SET SHOWPLAN_ALL ON'.
SMO:
- Fixed an issue in which SMO was not able to fetch AvailabilityReplica properties in case the server collation was case-sensitive (and therefore, SSMS could display an error message that resembles 'The multi-part identifier 'a.delimited' could not be bound.').
- Fixed an issue in the DatabaseScopedConfigurationCollection class in which incorrectly handling collations occur (and therefore, an SSMS that's running on an machine with a Turkish locale could display an error message that resembles 'legacy cardinality estimation is not valid scoped configuration' when you right-click a database that's running on a server with a case-sensitive collation).
- Fixed an issue in the JobServer class in which SMO was not able to fetch SQL Server Agent properties on a SQL Server 2005 server (and therefore, SSMS was throwing an error message that resembles 'Cannot assign a default value to a local variable. Must declare the scalar variable '@ServiceStartMode' and, ultimately, SSMS was not displaying the SQL Server Agent node in Object Explorer).
Templates:
- 'Database Mail': fixed several typos. For more information, see Fix spelling error in template 'Database Mail' > 'Simple Database Mail Configuration'.
Object Explorer:
- Fixed an issue in which Managed Compression would fail for indexes. For more informaiton, see SSMS 17.4 - Error when enabling page compression on index through GUI.
Auditing:
- Fixed an issue for the Merge Audit Files feature.
Known issues
Data classification:
- Removing a classification and then manually adding a new classification for the same column result in the old information type and sensitivity label being assigned to the column in the main view.
Workaround: Before saving, assign the new information type and sensitivity label after the classification is added back to the main view.