Tag: Linux

  • How Much Linux Do You Need?

    SQL Server on Linux was released with version 2017. Since then, I’ve seen some deployments of SQL Server on Linux, but many of the customers I work with still deploy SQL Server on Windows. While there are limitations and unsupported features, most of what we need is available in SQL Server on Linux.

    I assume most of you out there work on Windows machines against Windows servers. Maybe some of you run containers, but that’s likely a minority. Windows seems to have won the desktop and for most of us running SQL Server, the server room as well.

    However, if you use containers, you likely use Linux ones since SQL Server isn’t supported on Windows containers. I know I do, and I like them, but overall, I find I need to know very little Linux to do my job, or even work with the containers.

    I like Linux. As someone who learned Unix early on and installed Linux 0.8, I thought at one point I’d spend most of my career in that world. Especially as I worked with DOS and Windows 3.1 in corporate work and found them much less capable. I still remember writing grep.bat and awk.bat files to duplicate some of the things I did in Unix on DOS machines.

    For doing database work, most platforms are ported to Windows, but even if you connect to an Oracle/PostgreSQL/MySQL/MongoDB/etc. system running on Linux, do you need much linux? I find that ls, pwd, and cat get me through most of the things I need to do. When there’s something more complex, like sudo systemctl restart mssql-server, there are plenty of code snippets in the docs or some website. These days, you could even ask an AI how to do many simple tasks.

    If you don’t use Linux, then you don’t need any, but if you deal with any sort of system running on Linux, how much is important to know? What’s your top ten list of things a newbie should learn? Let us know today.

    Steve Jones

    Listen to the podcast at Libsyn, Spotify, or iTunes.

    Note, podcasts are only available for a limited time online.

  • If You Build It, Will They Use Linux?

    There’s a great scene in Field of Dreams where James Earl Jones says that people will come. It’s in response to the voices Kevin Costner hears early in the movie. This is the climax of the movie, where Costner makes a financial decision to trust his instincts and hope his farm will be saved.

    In many cases, organizations do just this. They build something, assuming people will come. They may have some data, research, or other reasoning as to why why people will use what they build. However, that’s not always the case. Sometimes they build something and hope people will come, much like Field of Dreams.

    I wondered about this recently with some friends when discussing SQL Server on Linux. Quite a few people I know haven’t seen any Linux installations inside their organizations. Others are consultants and haven’t experienced any work on Linux, which is interesting. I’ve heard people at Microsoft state there are plenty of installations out there, but I’ve found few people who have moved from Windows.

    I know a lot of people who work in the Microsoft data stack aren’t familiar with Linux. This is despite all the articles and writings the last few years trying to teach people about Linux and how SQL Server runs well. I also see articles like this one, which claims Linux uses more CPU. This is despite Red Hat saying Linux runs SQL Server well and leads in benchmarks from TPC, at least the TPC-H results.

    I learned at the various command lines in school, with a lot of time spent on Unix systems. Even with X-Windows, I often used the interface to open multiple shells to get work done. However, a lot of people have not worked at the command line very often. Despite the popularity of PowerShell, I find no shortage of Windows-based knowledge that struggles with certain concepts, like quoting and piping results between commands.

    I don’t know how many systems run Linux v Windows. Azure states that over 50% of their VMs aren’t Windows, but Linux. I suspect a lot of those are likely web servers or other systems and not database platforms. They don’t seem to publish how many databases are SQL Server on Linux, and I have no idea if Azure SQL Databases (or MI/Synapse/Fabric/etc.) run Windows or Linux. I suspect it could be either, but most likely Windows.

    Do you feel comfortable running SQL Server on Linux? Is your organization considering it? I don’t know I think it’s worth the savings in license costs. Not that Windows is cheap, but the effort to train, learn, and work on a second OS might not provide any savings for years. Maybe not ever if you can’t get work done smoothly and quickly.

    They built it; now, will you come run it?

    Steve Jones

    Listen to the podcast at Libsyn, Spotify, or iTunes.

  • Do We Need to Learn Linux?

    This week we got an announcement about SQL Server in Containers. Microsoft put out a blog noting that the beta program for SQL Server on Windows containers is suspended. They didn’t give any details, citing “ecosystem challenges and usage patterns” as a reason so suspend the program for the foreseeable future.

    Not only that, they noted that they were deleting docker hub images for express and developer, which makes sense from their perspective. They don’t want to support these. From the developer perspective, however, this will break and flow, pipelines, or even local scripts from developers. I understand the desire to delete images, but doing so without any notice doesn’t seem like fair treatment for people using them.

    This means that if you want to run SQL Server in a container in production, you likely have to use Linux. Windocks has an alternative with Windows, but Microsoft not supporting this is disappointing. I think that containers will be the future of database development, as they standardize and simplify how we can get an environment up and running. They also ensure consistent environments between developers, branches, automated systems and more. I think it’s going to take years, but that’s the direction where I think many of us will go over time. Those days of the Developer Edition will be gone, and instead we’ll just run a container.

    I’ve been using Linux containers for a few years, and they make it easy to quickly set up a clean environment with a new instance and a database or two. In that time, I’ve had to use a little Linux at times, but really, I start a container from a command line and then it acts like an instance I’ve installed. There isn’t a reason to actually do much in Linux. At least not for the core database stuff. Most of the ways that you’ll work with a Linux instance as a developer stay the same.

    For system administrators and DBAs, however, you might need to learn more. While setting up an instance on Linux isn’t hard, and easier in a container, if you are called on to work in bash, execute sudo, or some other Linux command, you might want some basic familiarity. Fortunately, you don’t need another workstation as Windows 10 includes a Windows Subsystem for Linux (WSL) that let’s you play around in Linux inside Windows 10.

    I think Linux is fascinating, and it’s evolved in many ways since I first saw it in 1991. Even if it’s not something you expect to use daily, spending a few hours learning how to navigate around and get things done is good for your mind, forcing you to learn a bit. The San Diego TIG did a series a few years ago, and you might go through those meetings or pick up a book and spend some time playing around with something new. You never know when this might be required in your career and a little familiarity could give you a jump start in the future.

    Do we need to learn Linux? No, but it’s not a bad idea to build a few skills in this area.

    Steve Jones

  • T-SQL Tuesday #116–Always Linux

    tsqltuesdayThis month is an interesting invitation from Tracy Boggiano. It’s on Linux, which I like. I hadn’t thought about this in terms of T-SQL Tuesday, but I think it fits and more than that, I think Linux will be the future of the backend data platform from Microsoft. I’ve said it in a few presentations, and I think we’ll get there in 10 years.

    In any case, I wanted to write about how I use Linux and SQL Server.

    Containers for Work

    One of the technologies that I see gaining a foothold in many companies is containerization. More and more developers are using containers, and asking for their databases to work in containers. At Redgate, we’ve been investigating this and are looking to build solutions that will use containers.

    As a result, I’m experimenting with SQL Server in containers on my laptop ad giving some presentations that share the way in which they work. I’ve written a little at SQLServerCentral as well as on this blog.

    In setting up my laptop, I installed Docker and experimented a little with Windows and Linux containers. I’ve standardized on Linux containers, because they’re more mature for production (Windows containers are in preview now), and I think with Kubernetes and the growth of how the SQL Server 2019 Big Data Clusters will work, I expect more Linux for servers in the future.

    I’m also using this as an opportunity to brush up on some bash and Linux skills, connecting to my containers with the –it (interactive) switch, as well as using the Windows Subsystem for Linux.

    It’s slow learning, and it’s interesting trying to juggle things in bash and PowerShell at the same time, but I expect these skills will become more hand in the future.