SQL Server is Microsoft’s enterprise relational database offering. It was first released in 1989 and has seen support on various Windows and OS/2 platforms since it’s release. In October 2017, Microsoft released SQL Server 2017 for Linux. To date, Ubuntu 16, Red Hat Enterprise Linux 7.3 and 7.4 as well as SUSE Enterprise Linux Server v12 are supported.
Though the Linux distribution is missing features found in the Windows offering, the result is a very useful and feature-rich database that fits in well in a UNIX environment.
Mark calls this a minimalist guide, but he does cover a lot of the basics.
Docker is available for Mac and Windows with a simple installation by the defaults.
- Download the correct installation for your OS type.
- Run the installer and keep all the defaults, choosing Linux containers, not Windows containers
- Reboot Windows workstations- Done.
Incredibly Simple MSSQL Container Install
Microsoft has done a great job of creating a very small, (maybe a bit too small, but we’ll get into that later…) image that can be used to create a running Linux container with SQL Server. This grants to student a great opportunity to simulate much of what it would be like to work on a real Linux server.
Click through to read the whole thing. And Kellyn’s not kidding about the image missing basic packages.
I recently bought a Dell XPS 13 running Ubuntu 16.04 and ran into an issue when connecting SQL Operations Studio (version 0.31.4) to SQL 2017 CU9 running in a docker container. Other people seem to encountering this issue as well so am posting it so that it may be of some help to someone in the future.
The error generated was: –
System.Data.SqlClient.SqlException (0x80131904): A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: SSL Provider, error: 31)
The full error can be viewed here
Read on for the solution.
WSL is primarily aimed at developers, and it allows you to run Linux environments directly on Windows in a native format and without the overhead of a virtual machine. Let us retake a look at that statement: run Linux environments directly on Windows in a native format. Yes native format, WSL is not a UNIX-like environment like Cygwin, which wraps non-Windows functionality in Win32 system calls but it serves Linux programs as special, isolated minimal processes (pico-processes) attached to kernel-mode pico-providers. If you want to read all the “gory” details about WSL: Windows Subsystem for Linux Overview gives you an excellent introduction.
Surprisingly, it’s pretty easy—I would have expected some strange compatibility issues.
This has been an issue for sometime until now. I found the following link that help me install SQL Server on the latest Ubuntu 18.04:
But, there are few missing steps which can help ease the burden of errors. At the same time, the information is a little out-dated.
But, it works with the following adjustments.
Please Understand!! This is NOT approved by Microsoft. Use this method for Test Only!!
I’m waiting somewhat impatiently for Microsoft and Hortonworks to support Ubuntu 18.04.
I setup a new instance of SQL Server on Linux some time ago. At the time, the Linux machine didn’t have any Samba running, and no real “name” on the network. As a result, after installing SQL Server I got a NULL when running SELECT @@SERVERNAME.
The fix is easy. It’s what you’d do if you had the wrong name.
Read on for the command, and don’t forget to restart the database engine afterward.
When I first started playing with this version, I noticed that SQL Agent was disabled. That’s not great, since SQL Agent is a great tool for various tasks in SQL Server. I can’t start the agent from here, as the underlying implementation is different, and I’m not really a host OS admin when connecting in SSMS.
After checking which patch level I was at (CU6), I changed to my Linux console, and ran the configuration utility. For Linux, this is mssql-conf.
It’s not an overly complicated process but the process is a bit different from Windows, so check it out.
As many of us are familiar with, GDPR is approaching and we made some updates. In the past, file history stored entire T-SQL queries. However, if the query contained any secrets or passwords, it wasn’t smart enough to scrub those out. This is no longer the case, and now file history has been updated to no longer store secrets or passwords.
In addition, we have added 24-hour rotation of UserID when we collect telemetry.
Read on for other improvements.
To create the VMs, you need to go through these four steps:
Basics to configure basic setting of the VM
Size to choose the VM machine size
Settings to configure the features. In this case, the default values are used. You just need to click the Next button to proceed further
Once it’s running, Prashanth shows how to connect via PuTTY and configure the service.
So, I bit: the tweet he referenced was announcing a new version of the SQL Server module (21.0.17240). Here’s a quick list of the updates included:
- Added Get-SqlBackupHistory cmdlet
- Ported PS Provider to .NET Core for PowerShell 6 support
- Ported a subset of cmdlets to .NET Core for PowerShell 6 support
- Powershell 6 support on macOS and Linux in Preview.
- To use SqlServer provider on macOS and Linux mount it using a new PSDrive. Examples in documentation.
- Removed restriction of 64-bit OS for this module. Note: Invoke-Sqlcmd cmdlet is the only cmdlet not supported on 32-bit OS.
The bold lines are my emphasis: with PowerShell 6 support for Linux and macOS, that opens up new avenues for connecting to and automating SQL Server from any platform. This is exciting stuff. I couldn’t wait to take it for a spin, so I set up a quick demo environment to test it out.
It’s not perfect but it did give Drew the vapors, which is a good sign that they’re on the right track.