Starting with SQL Server 2017, you can now install SQL Server directly on to a Linux machine. And because macOS is Unix based (and Linux is Unix based), you can run SQL Server for Linux on your Mac. The way to do this is to run SQL Server on Docker. So let’s go ahead and install Docker. Then we’ll download and install SQL Server.
Here I’ll show you how to get SQL Server up and running on your Mac in less than half an hour. And the best part is, you’ll have SQL Server running locally without needing any virtualization software.
- Installation guidance for SQL Server on Linux.; 7 minutes to read +9; In this article. Applies to: SQL Server (all supported versions) - Linux This article provides guidance for installing, updating, and uninstalling SQL Server 2017 and SQL Server 2019 on Linux.
- Download the SQL Server 2017 Express installer (SQLServer2017-SSEI-Expr) on this page that, when executed, will present options to perform an installation or download media only. Additional Information.
Prior to SQL Server 2017, if you wanted to run SQL Server on your Mac, you first had to create a virtual machine (using VirtualBox, Parallels Desktop, VMware Fusion, or Bootcamp), then install Windows onto that VM, then finally SQL Server. This is still a valid option depending on your requirements (here’s how to install SQL Server on a Mac with VirtualBox if you’d like to try that method).
Starting with SQL Server 2017, you can now install SQL Server directly on to a Linux machine. And because macOS is Unix based (and Linux is Unix based), you can run SQL Server for Linux on your Mac. The way to do this is to run SQL Server on Docker.
So let’s go ahead and install Docker. Then we’ll download and install SQL Server.
Install Docker
Download the (free) Docker Community Edition for Mac (unless you’ve already got it installed on your system). This will enable you to run SQL Server from within a Docker container.To download, visit the Docker CE for Mac download page and click Get Docker.To install, double-click on the .dmg file and then drag the Docker.app 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
Launch Docker the same way you’d launch any other application (eg, via the Applications folder, the Launchpad, etc).When you open Docker, you might be prompted for your password so that Docker can install its networking components and links to the Docker apps. Go ahead and provide your password, as Docker needs this to run.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.To do this:- Select Preferences from the little Docker icon in the top menu
- Slide the memory slider up to at least 4GB
- Click Apply & Restart
Download SQL Server
Now that Docker is installed and its memory has been increased, we can download and install SQL Server for Linux.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.Update: When I first wrote this article, I used the following image:Which downloaded SQL Server 2017. Therefore, the examples below reflect that version.Launch the Docker Image
Run the following command to launch an instance of the Docker image you just downloaded:But of course, use your own name and password. Also, if you downloaded a different Docker image, replacemicrosoft/mssql-server-linux
with the one you downloaded.Here’s an explanation of the parameters:-d
This optional parameter launches the Docker container in daemon mode. This means that it runs in the background and doesn’t need its own Terminal window open. You can omit this parameter to have the container run in its own Terminal window. --name sql_server_demo
Another optional parameter. This parameter allows you to name the container. This can be handy when stopping and starting your container from the Terminal. -e 'ACCEPT_EULA=Y'
The Y
shows that you agree with the EULA (End User Licence Agreement). This is required in order to have SQL Server for Linux run on your Mac.-e 'SA_PASSWORD=reallyStrongPwd123'
Required parameter that sets the sa
database password.-p 1433:1433
This maps the local port 1433 to port 1433 on the container. This is the default TCP port that SQL Server uses to listen for connections. microsoft/mssql-server-linux
This tells Docker which image to use. If you downloaded a different one, use it instead. Password Strength
If you get the following error at this step, try again, but with a stronger password.I received this error when usingreallyStrongPwd
as the password (but of course, it’s not a really strong password!). I was able to overcome this by adding some numbers to the end. However, if it wasn’t just a demo I’d definitely make it stronger than a few dictionary words and numbers.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:Install sql-cli (unless already installed)
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.This assumes you have NodeJs installed. If you don’t, download it from Nodejs.org first. Installing NodeJs will automatically install npm which is what we use in this command to install sql-cli.Permissions Error?
If you get an error, and part of it reads something likePlease try running this command again as root/Administrator
, try again, but this time prependsudo
to your command:Connect to SQL Server
Now that sql-cli is installed, we can start working with SQL Server via the Terminal window on our Mac.Connect to SQL Server using themssql
command, followed by the username and password parameters.You should see something like this:This means you’ve successfully connected to your instance of SQL Server.Run a Quick Test
Run a quick test to check that SQL Server is up and running and you can query it.For example, you can run the following command to see which version of SQL Server your running:If it’s running, you should see something like this (but of course, this will depend on which version you’re running):If you see a message like this, congratulations — SQL Server is now up and running on your Mac!
A SQL Server GUI for your Mac – 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 Mac. 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.
Here are some articles/tutorials I’ve written for Azure Data Studio:
Another Free SQL Server GUI – DBeaver
Another SQL Server GUI tool that you can use on your Mac (and Windows/Linux/Solaris) is DBeaver.
DBeaver is a free, open source database management tool that can be used on most database management systems (such as MySQL, PostgreSQL, MariaDB, SQLite, Oracle, DB2, SQL Server, Sybase, Microsoft Access, Teradata, Firebird, Derby, and more).
I wrote a little introduction to DBeaver, or you can go straight to the DBeaver download page and try it out with your new SQL Server installation.
Limitations of SQL Server for Linux/Mac
SQL Server for Linux does have some limitations when compared to the Windows editions (although this could change over time). The Linux release doesn’t include many of the extra services that are available in the Windows release, such as Analysis Services, Reporting Services, etc. Here’s a list of what’s available and what’s not on SQL Server 2017 for Linux and here’s Microsoft’s list of Editions and supported features of SQL Server 2019 on Linux.
Another limitation is that SQL Server Management Studio is not available on Mac or Linux. SSMS a full-blown GUI management for SQL Server, and it provides many more features than Azure Data Studio and DBeaver (at least at the time of writing). You can still use SSMS on a Windows machine to connect to SQL Server on a Linux or Mac machine, but you just can’t install it locally on the Linux or Mac machine.
If you need any of the features not supported in SQL Server for Linux, you’ll need SQL Server for Windows. However, you can still run SQL Server for Windows on your Mac by using virtualization software. Here’s how to install SQL Server for Windows on a Mac using VirtualBox.
-->Developer Community| System Requirements| Compatibility| Distributable Code| License Terms| Blogs| Known Issues
Note
This is not the latest version of Visual Studio. To download the latest release, please visit the current release notes for Visual Studio 2019.
Visual Studio 2017 contains many new and exciting features and IDE productivity enhancements tosupport Windows app development, cross-platform mobile development, Azure development, web and cloud development,and more. To try out Visual Studio 2017, see Visual Studio 2017 Downloads.For more information about everything that's new in this release, see theVisual Studio 2017 release notes andWhat's New in Visual Studio 2017.
For Visual Studio Code, see Visual Studio Code FAQ.
For Visual Studio 2017 for Mac, see Visual Studio 2017 for Mac Platform Targeting and Compatibility.
For Visual Studio 2017 for Mac release notes.
For Visual Studio 2017 for Mac, see Visual Studio 2017 for Mac Platform Targeting and Compatibility.
For Visual Studio 2017 for Mac release notes.
Installation
You can install and use Visual Studio 2017 alongsideprevious versions of Visual Studio, including Visual Studio 2015, Visual Studio 2013, and Visual Studio 2012.
Download
Click a button to download the latest version of Visual Studio 2017. For instructions on installing and updating Visual Studio 2017, see the Update Visual Studio 2017 to the most recent release. Also, see instructions on how to install offline.
Note
This is not the latest version of Visual Studio. To download the latest release, please visit the current release notes for Visual Studio 2019.
Visit the the Visual Studio downloads page to get the latest Visual Studio products.
Note: Installation package size will vary depending on your current Visual Studio configuration.
System Requirements
For information on the system requirements for installing and running the Visual Studio 2017 family of products,including Team Foundation Server 2017, see the Visual Studio 2017 System Requirement page andVisual Studio 2017 for Mac Product Family System Requirements.
Feedback and Support
For support, or to submit feedback on Visual Studio, see:
Upgrade Projects to Visual Studio 2017
When following the supported upgrade paths, your Visual Studio source, solutions, and project files will continueto work; however, you should expect to make some changes to sources. While we cannot guarantee binary compatibilitybetween releases, we will do our best to document significant changes to assist you with updates.
Note
For details on how to migrate your projects to Visual Studio 2017, see Porting, Migrating, and Upgrading Visual Studio Projects.
Platform Targeting
Visual Studio provides cutting-edge tools and technologies to create apps that take advantage of thelatest platform capabilities, whether Windows, Android, iOS, or Linux. Visual Studio 2017 also targetsearlier platforms so you can create new apps or modernize existing apps that execute on earlier versionsof Windows while leveraging the enhanced development tools, quality enablement, and team collaborationcapabilities in Visual Studio 2017. For more information, see Managing references in aproject and Visual Studio Multi-TargetingOverview.
Visual Studio 2017 Support for Windows Development
The following table explains the Microsoft Windows platforms for which you can build apps by using Visual Studio 2017.
Build Apps that Run on Windows Clients | Using Tools for Native and Managed Classic Windows Desktop Development | Using Tools for UWP App Development |
Windows 10 | Yes (see notes below) | Yes (see notes below) |
HoloLens | No | Yes See the Windows Holographic Dev Center. |
Xbox One | Not applicable | Yes See the Xbox Dev Center. |
Windows 8.1 (Windows 8) | Yes | Windows Store app development is not available. |
Windows 7 | Yes | Not applicable |
Windows Vista | Yes Remote debugging and profiling tools are not available. | Not applicable |
Windows XP | Yes Managed development requires using Visual Studio .NET multi-targeting. Remote debugging and profiling tools are not available. | Not applicable |
Build Apps that Run on Windows Phone | Using Tools for Native and Managed Classic Windows Desktop Development | Using Tools for UWP App Development |
Windows 10 Mobile | No | Yes (see notes below) |
Windows Phone 8.1 and earlier | No | Windows Store app development is not available. |
Build Apps that Run on Windows Server | Using Tools for Native and Managed Classic Windows Desktop Development | Using Tools for UWP App Development |
Windows Server 2016 | Yes | Yes (see notes below) |
Windows Server 2016, Nano Server Installation Option | Yes, for .NET Core and a subset of Win32 See the Nano Server Dev Center. | No |
Windows Server 2012 R2 | Yes | Windows Store app development is not available. |
Windows Server 2012 | Yes | Windows Store app development is not available. |
Windows Server 2008 R2 | Yes | Not applicable |
Windows Server 2008 | Yes Remote debugging and profiling tools are not available. | Not applicable |
Windows Server 2003 | Yes Remote debugging and profiling tools are not available. Managed development requires using Visual Studio .NET multi-targeting and requires side-by-side installation of Visual Studio 2010. For more information, see: A Look Ahead at the Visual Studio 2012 Product Lineup and Platform Support. | Not applicable |
Build Apps that Run on Windows Embedded Devices | Using Tools for Native and Managed Classic Windows Desktop Development | Using Tools for UWP App Development |
Windows 10 IoT Core | Yes, for a subset of Win32 APIs See the IoT Core API Porting Tool for information. | Yes See the Windows IoT Dev Center for additional tools and resources. |
Windows 10 IoT Mobile Enterprise | No | Yes See the Windows IoT Dev Center for additional tools and resources. |
Windows 10 IoT Enterprise | Yes See the Windows IoT Dev Center for additional tools and resources. | Yes See the Windows IoT Dev Center for additional tools and resources. |
Windows Embedded 8 Standard and 8.1 Industry | Yes | No |
Windows Embedded Compact 2013 | No | Not applicable |
Windows Embedded 7 (Compact, Standard, and POSReady) | No | Not applicable |
Windows Embedded CE 6.0 and earlier | No | Not applicable |
Windows XP Embedded (Including POSReady 2009, WES 2009, WEPOS) | No | Not applicable |
Notes
- For support information regarding Microsoft operating systems, see Microsoft Support Lifecycle and Windows 10 Release Information.
- For support information on Microsoft .NET Framework, see .NET Framework Support Lifecycle FAQand .NET Framework System Requirements.
- Windows 10 Enterprise LTSB edition and Windows 10 S are not supported for development.You may use Visual Studio 2017 to build apps that run on Windows 10 LTSB and Windows 10 S. Remote debuging is supported on LTSB.
- Universal Windows app development for all target platforms is available when Visual Studio is installed on Windows 10.
- Universal Windows apps can be built from the command line when using Windows Server 2012 R2 or Windows Server 2016. UWP development—includingdesigning, editing, and local debugging—is not available on Windows Server. You may deploy these apps to Windows server and debug them remotely.
- Cordova, Unity, and Xamarin can also be used for cross-platform development of Universal Windows Apps on Windows 10.
Visual Studio 2017 Support for .NET Development
Visual Studio 2017 supports development of apps that use any of the .NET implementations. Among the workloads and project types, you can find support for.NET Framework, .NET Core, Mono, and .NET Native for Universal Windows Platform (UWP). Visual Studio 2017 supports the following implementations:
- .NET Framework versions 4.7, 4.6.2, 4.6.1, 4.6, 4.5.2, and 3.5
- .NET Core 2.0, 1.1, and 1.0.
Note
For more information on each of these implementations, and on the common API specification .NET Standard, see .NET architectural components.
Visual Studio 2017 Support for Android Development
Visual Studio 2017 enables you to build native Android apps using Xamarin and C# or using Java/C++, and hybridAndroid apps using Apache Cordova 6.3.1 and JavaScript and TypeScript. The Visual Studio Tools for Unity andthe Unreal Engine enable Android game development. You can also use Visual Studio for Macto build Android apps using a Mac.
You can use Visual Studio setup to easily obtain the Android SDK and Android API levels 19, 21, 22, and 23.You can download additional API levels separately using the Android SDK Manager.You can also use Visual Studio Setup to obtain the Android Native Development Kit (R10E), Java SE Development Kit, and Apache Ant.
For more information, see Android development with Visual Studio andMobile App Development.
Note
For information on .NET development for Android, see .NET architectural components.
Visual Studio 2017 Support for iOS Development
Visual Studio 2017 enables you to build and debug apps for iOS by using Apache Cordova, C++, Unity, or Xamarinand a Mac configured for iOS development when using remotebuild, vcremote, the Visual Studio Tools for Unity,or the Xamarin Mac Agent. Xamarin supports iOS 7 and higher, and requires OS X 10.10 'Yosemite' or higher.Apache Cordova supports iOS 8 and higher, and requires OS X 10.9 'Mavericks' and higher. You can also useVisual Studio for Mac to build iOS apps using a Mac.
Note
Sql Express 2017 Offline
For more information, see Cross-platform mobile development in Visual Studio.For information on .NET development for iOS, see .NET architectural components.
Visual Studio 2017 Support for Linux Development
Visual Studio 2017 enables you to build and debug apps for Linux using C++, Python, and Node.js.Creating C++ apps for Linux requires theVisual C++ for Linux Development extension. Creating apps with Python orNode,js, requires that you enable remote debugging on the target Linux machine. You can also create, buildand remote debug .NET Core and ASP.NET Core applications for Linux using modern languages such as C#, VB and F#.
Note
For information on .NET development for Linux, see .NET architectural components.
- CentOS 7.1 and Oracle Linux 7.1
- Debian 8
- Fedora 23
- Linux Mint 17
- openSUSE 13.2
- Red Hat Enterprise Linux 7.2
- Ubuntu 14.04 and 16.04
Note
For more information see the .NET Core Website.
Visual Studio 2017 Support for macOS Development
Visual Studio 2017 enables you to build console applications and ASP.NET applications that target macOS.However, debugging is not supported. For additional macOS development tools choices, try Visual StudioCode or Visual Studio for Mac. Visual Studio Code provides a streamlined,extensible developer tool experience for macOS. Visual Studio for Macprovides a feature-rich IDE that enables you to build native macOS apps, including ASP.NET, using C#.
Note
For information on .NET development forMacOS, see .NET architectural components.
Other Platforms and Technologies
Visual Studio 2017 also supports the following platforms and technologies. For more information, seehttps://visualstudio.microsoft.com/vs/features/.
- Apache Ant
- Azure web apps and connected services, including Azure Data Lake
- Docker
- PowerShell
- Python and Python IoT tools
- Web Development with ASP.NET, HTML5/CSS3, JavaScript, Node.js, Python, or TypeScript
Compatibility with Previous Releases
.NET Framework
.NET 4.7 is is a highly compatible in-place update of .NET 4, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, and 4.6.2.
Note
For more information, see the Migration Guide to the .NET Framework 4.7, 4.6, and 4.5.
Team Explorer and Team Foundation Server
Team Explorer for Visual Studio 2017 will connect to Team Foundation Server 2017, Team Foundation Server 2015,Team Foundation Server 2013, Team Foundation Server 2012, and Team Foundation Server 2010 SP1.
Silverlight
Silverlight projects are not supported in this version of Visual Studio. To maintain Silverlight applications,continue to use Visual Studio 2015.
Windows Store and Windows Phone apps
Sql Express 2017 Advanced Download
Projects for Windows Store 8.1 and 8.0, and Windows Phone 8.1 and 8.0 are not supported in this release. Tomaintain these apps, continue to use Visual Studio 2015. To maintain Windows Phone 7.x projects, use Visual Studio 2012.