- Download Sql Studio For Mac
- Sql Operations Studio For Mac
- Sql Studio For Sql Server
- Music Studio For Mac
Today we are announcing the release of Visual Studio for Mac version 7.6. Our focus with this release has been to improve product reliability in various areas, with a special focus on the code editing experience. We have also made several fixes that improve IDE performance. Finally, we’ve extended our support for Azure functions with the addition of new templates and the ability to publish your function to Azure from within the IDE.
Drag Visual Studio Code.app to the Applications folder, making it available in the Launchpad. Add VS Code to your Dock by right-clicking on the icon and choosing Options, Keep in Dock. Launching from the command line.
This post highlights the major improvements in this release. To see the complete list of changes, check out the Visual Studio for Mac version 7.6 Release Notes. You can get started by downloading the new release or updating your existing install to the latest build available in the Stable channel.
Improving reliability of the Code Editor
We’ve focused our attention on improving the reliability of the code editor in Visual Studio for Mac and have addressed several issues with the code editor. In particular, we want to highlight the following fixes to issues many of you have reported:
- We fixed an issue where Quick Fix menu items don’t display if source analysis is disabled.
- We also addressed a widely reported issue where tooltips wouldn’t disappear.
- We fixed an issue where IntelliSense seems to fail, resulting in red “squiggles” continuing to hang around in the editor even though there were no errors.
- We improved IntelliSense for F# developers. There was an issue where you could not use “.” for autocompletion, but we’ve fixed this and various other F# IntelliSense issues.
- We made improvements to JavaScript syntax highlighting.
Improving performance of the IDE
One of the top reported bugs in previous releases has been performance issues in the editor. Having a fast and reliable code editor is a fundamental part of any IDE and an important part of any developer’s workflow, so we’ve made some improvements in this area:
- We improved tag-based classification for C# with PR #4740 by reusing existing Visual Studio for Windows code, which should improve typing performance in the editor.
- We now support no-op restore of NuGet packages when opening a solution. This change speeds up NuGet restores on solution load.
We’ve also added many more small fixes that improve startup time and reduce memory consumption of the IDE.
Richer support for Azure Functions
Azure functions are a great way to quickly get up and running with a serverless function in just a few minutes. With this release, we have introduced new templates for you to choose from when creating your Azure Functions project:
These new templates allow you to configure access rights, connection strings, and any other binding properties that are required to configure the function. For information on selecting a template, refer to the Available function templates guide.
Another major part of the Azure functions workflow that we are introducing with this release is publishing of functions from Visual Studio for Mac to the Azure Portal. To publish a function, simply right-click on the project name and select Publish > Publish to Azure. You’ll then be able to publish to an existing Azure App Service or use the publishing wizard to create a new one:
For information on publishing to Azure from Visual Studio for Mac, see the Publishing to Azure guide.
Share your Feedback
Addressing reliability and performance issues in Visual Studio for Mac remains our top priority. Your feedback is extremely important to us and helps us prioritize the issues that are most impacting your workflow. There are several ways that you can reach out to us:
- Use the Report a Problem tool in Visual Studio for Mac.
- We are enhancing the Report a Problem experience by allowing you to report a problem without leaving the IDE. You’ll have the ability to automatically include additional information, such as crash logs, that will help our Engineering team narrow down the root cause of your report more effectively. This will be introduced in an upcoming servicing release to 7.6 that will be available in the Stable channel within the next few weeks.
- You can track your issues on the Visual Studio Developer Community portal where you can ask questions and find answers.
- In addition to filing issues, you can also add your vote or comment on existing issues. This helps us assess the impact of the issue.
Years ago when I switched from Windows to Mac, people have told me regularily that I’m crazy. How can I be that stupid to work on MacOS when I’m dependent on SQL Server? In my case it wasn’t that terrible, because my main work is about content creation (writing blog postings, articles, presentations, training videos) and very often I was only connecting through a RDP connection to a remote SQL Server. Therefore running natively on MacOS was not a big deal for me, and for the last resort I always have a Windows VM which runs in VMware Fusion on my Mac.
But since the introduction of the Container concept through Docker and the possibility to run SQL Server directly in a Container, my life was changing even better. Because now I can run SQL Server 2017+ directly on my Mac and I even don’t really need a Windows VM anymore. In this blog posting I want to show you how you can do the same and run SQL Server directly on your Mac in a Docker container.
Installing SQL Server in a Docker Container
Before you can install SQL Server in a Docker Container on the Mac, you have to install and configure of course Docker itself. I don’t want to go into the details how to install Docker itself, because the necessary steps are very well documented.
Before you can create a Docker Container for SQL Server, you have to pull the correct Docker Image from the Docker Registry. In my case I have decided to try out the latest CTP version of SQL Server 2019:
docker pull mcr.microsoft.com/mssql/server:2019-CTP2.1-ubuntu
When you have pulled the image, you can see it with the docker images command in your Terminal:
You can think about a Docker Image like an ISO file: it’s just an image, and you can’t run it directly, because you have to install it. Therefore we also have to “install” the pulled Docker Image. In Docker you can “install” an image by running it. And that creates the actual Docker Container, which is finally the exectuable that you are executing. Let’s run our Docker Image with the docker run command:
docker run -e ‘ACCEPT_EULA=Y’ -e ‘SA_PASSWORD=passw0rd1!’ -p 1433:1433 –name sql2019_ctp2 -d mcr.microsoft.com/mssql/server:vNext-CTP2.0-ubuntu
As you can see from the command line, you have to pass in a lot of different parameters. Let’s have a more detailed look on them:
- -e ‘ACCEPT_EULA=Y’
- With the -e option you set an environment variable, on which SQL Server is dependent on. In our case we have to accept the EULA to be able to use SQL Server.
- -e ‘SA_PASSWORD=passw0rd1!‘
- With the SA_PASSWORD environment variable we set the password for the SA login.
- -p 1433:1433
- With the -p option we bind a port on our host machine (in my case on the Mac) to a port in the Container. The port on the left side of the colon is the port on the host machine, and the port on the right side of the colon is the port in the Container. In my case I bind the default SQL Server port of 1433 within the Container to the port 1433 on my Mac.
- Therefore I can directly access the exposed SQL Server Container through the IP address of my Mac on the network. If you have multiple SQL Server Containers, you can also bind them to different ports on your host machine to access them independently from each other.
- –name
- With the –name option we assign a custom name to our Docker Container.
- -d
- And with the -d option we specify the Docker Image that we have pulled previously, and that you want to run the Docker Container detached from the Terminal. This just means that you can close your Terminal, and your Docker Container is still running in the background.
After you have executed that Docker command, your Docker Container is up and running.
Accessing SQL Server on a Mac
We have now 2019 up and running in a Docker Container. But how do we access SQL Server? Of course, I can start up a Windows VM, and use SQL Server Management Studio to access SQL Server. But then I’m again dependent on a Windows VM, which also needs periodically updates, and it would be also a huge overhead to deploy a whole Windows VM just for SQL Server Management Studio…
Therefore let’s introduce Azure Data Studio! Azure Data Studio was formerly known as SQL Operations Studio and it is a client application with which you can manage SQL Server – natively on Windows, Linux, and Mac!!!
As you can see from the previous picture, I have connected here directly to localhost, because in the last step we have exposed the port 1433 of the Docker Container to our host machine. Don’t get me wrong: compared to SQL Server Management Studio, Azure Data Studio is “nice” but… 😉
But hey, I can run it directly on my Mac (without the need of a Windows VM), I can run SQL statements, I have access to Estimated and Actual Execution Plans, and very importantly – it’s extensible. What do I need more? For the kind of work that I’m doing, it’s enough.
Restoring your first Database
When you look back to the previous picture, you can see that you got a vanilla installation of SQL Server 2019. There are our system databases, the crazy default settings, and that’s it. There are of course currently no other database. So you have to create your own databases, or you take an existing database (maybe from a Windows-based SQL Server installation) and you restore it in your Docker Container. Let’s do that now.
In my case I want to show you now the necessary steps how to restore AdventureWorks in the Docker Container. First of all you have to copy your backup file into the Docker Container. But you can’t do a regular cp command from the Terminal, because that command has no idea about your Docker Container. Makes somehow sense…
Therefore your Docker installation offers you the command cp with which you can copy a local file into a Docker Container and vice versa. Let’s take now our backup of AdventureWorks and copy it into the folder /var/backups of our Docker Container:
docker cp AdventureWorks2014.bak sql2019_ctp2:/var/backups/AdventureWorks2014.bak
After you have copied the backup file, we can now restore the database. But the destination folders are different as on a Windows-based SQL Server installation, therefore we also have to move our data and log files. Therefore I have executed in the first step the following command to get the logical file names of our database backup.
RESTORE FILELISTONLY FROM DISK = ‘/var/backups/AdventureWorks2014.bak’
And based on that information, let’s perform now the restore of our database.
RESTORE DATABASE AdventureWorks2014 FROM DISK = ‘/var/backups/AdventureWorks2014.bak’
WITH
Download Sql Studio For Mac
MOVE ‘AdventureWorks2014_Data’ TO ‘/var/opt/mssql/data/Adventureworks2014.mdf’,
MOVE ‘AdventureWorks2014_Log’ TO ‘/var/opt/mssql/data/Adventureworks2014.ldf’
As you can see I’m moving the data and log files into the folder /var/opt/mssql/data. And now we have our AdventureWorks database restored in our Docker Container.
Sql Operations Studio For Mac
When you are finished with your work in your Docker Container, you can stop the Container with the following command:
docker stop sql2019_ctp2
And with a docker start command, you can restart your Container again:
docker start sql2019_ctp2
In that case, all the changes that you have done in your Docker Container (like restoring the AdventureWorks database), are persisted across restarts.
Summary
Sql Studio For Sql Server
Running SQL Server natively on a Mac or on Linux was always a huge April fool. But with the introduction of Docker, and the SQL Server support for it, it’s now real. You can now run natively SQL Server on the Mac, and with the help of Azure Data Studio you can even access SQL Server with a native MacOS application. We have really exiting times ahead of us!
Thanks for your time,
Music Studio For Mac
-Klaus