11 ms·
Ask HN: Would you consider running SQL Server on Linux?
SQL Server 2017 has been announced and the big feature is cross platform.
I'm wondering how many Linux people out there would consider running SQL Server on Linux in a production environment. If not, why not?
I can guess some of the reasons people will site but I expect there are many more.
- dozzie 9y ago> If not, why not? First most important question to answer: in what way MS SQL Server would be better than PostgreSQL? Fields to consider: - Easier to install? (apt-get install postgresql-server) - Easier to use? (initiating the Sybase client library used to be terrible) (EDIT: it was installing the client library, not initiating it) - Easier to manage? (Postgres is excellent in this field) - Has important functions or features that PostgreSQL doesn't? - Works significantly faster than PostgreSQL? Going out of one's way to use third party software needs to give some benefits to offset the cost of doing so.
- james_anderson 9y agoYeah, I agree. Each has the odd thing the other doesn't but it is hard to justify the cost of SQL Server over Postgres
- BrentOzar 9y ago> but it is hard to justify the cost of SQL Server over Postgres For the benefits of readers who don't know, SQL Server Standard Edition is ~$2k USD per CPU core, and Enterprise Edition is $7k.
- snuxoll 9y agoEnterpriseDB is something like $1700/core/year, which targets the same market - "enterprise" shops who want a vendors neck to wring when something breaks. Honestly, SQL Server is priced very well - even enterprise edition given the features it provides. The biggest problem I have with it is T-SQL being terrible compared to pl/pgsql and the lack of developer-centric features like arrays, composite types, and a lot of other QoL features postgres has that MSSQL doesn't. If you're going to deploy SQL Server, being able to do it on a platform that doesn't make me as a sysadmin/DevOps Engineer want to strangle myself with cluster configuration nightmares is a welcome change.
- arethuza 9y agoWhat if I want to run an application that doesn't support Postgres?
- polskibus 9y agoDoes it have analysis services and Integration services yet? Last time it I checked it didn't. It's a big differentiator against open source stacks. If it was available on Linux then perhaps some of our clients would consider moving to Linux based SQL server.
- way0utwest 9y agoSSIS, yes: https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-migrate-ssis https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-... SSAS, not yet, though few people use this and I don't know I'd recommend it on the same box. Is that a reason to move SSIS/SQL Engine to Linux and have SSAS on Windows? You'd have to decide.
- polskibus 9y agoThe reason is to get out of Windows licensing that is a mess, if you are trying to offer something on a cloud, outside Azure. In theory and in some interpretation, Windows Authentication (the only accepted auth mechanism by SSAS) requires all direct and indirect users to have a Windows Server CAL (!).
- gjvc 9y agoIn a previous job we had a central master MSSQL database and several replicas of this database globally. This was all run on Windows (obviously) Were I still there, and were this arrangement still in effect, I would certainly be interested in migrating the installations on Windows to installations on CentOS, if only to make the server fleet that much more homogenous. So, to answer the question, to eliminate Windows server installations in a predominantly Linux environment, yes.
- james_anderson 9y agoCool, I've seen this mentioned as a potential reason, so it's good to hear of a real-world example
- thinkMOAR 9y agoJust for my curiosity, do you work for microsoft?
- james_anderson 9y agoNo, but I am predominantly a SQL Server DBA. I thought people might think that after I posted.
- sheraz 9y agoProbably Not for my use cases. If I really wanted sql server then I most likely will consider azure's hosted sql offerings. One thing I'm not so clear with , however, is linux support for sql server clients. More specifically Django?
- way0utwest 9y agoWhat support are you looking for? SQL Server on Linux, is for the most part, SQL Server. Django support for SQL Server should be roughly the same on Windows and Linux, they're just client apps. All my testing, which is inherently limited to the things I look at, show that apps seamlessly port over from Windows to Linux, unless they're doing something in the file system, or have complexities with SQL Agent and other subsystems. Maybe of the Agent limitations have been removed, I just haven't retested. MS supports Linux the same as Windows, with lots of their systems people having spent the last year+ learning about the differences between Windows and Linux. Are they all going to be experts on client interactions? No, but they should be able to provide support in most cases.
- mindcrime 9y agoNo, almost certainly not. Why would I use MSSQL in the first place, when I could just use PostgreSQL? The main reason I could see to use MSSQL would be "you're in a Windows shop already", and if that isn't the case, I don't see much reason for it.
- arethuza 9y agoIn my experience, the main reason why most organizations run things like SQL Server or indeed Oracle is because they want to run applications that depend on those particular databases.
- lmm 9y agoSure - but it would be weird for an application to depend on SQL server and not depend on Windows, and if you're going to be running Windows for some of your servers anyway it's easier to use the same platform for all of them.
- beefhash 9y agoThere are some .NET Core programs that also depend on SQL Server but not Windows necessarily. Bitwarden[1] comes to mind. [1] https://help.bitwarden.com/article/install-on-premise/ https://help.bitwarden.com/article/install-on-premise/
- hungerstrike 9y agoI would have said the same thing if I had never used MSSQL. PG just doesn't have the same quality SQL-dialect or tools as MSSQL though. Some very basic facilities are missing from PG like snapshot and transaction logs, batched triggers and being able to return multiple resultsets from a single trip to the database server. Even the free tools for SQL Server are better than anything you can get for PG and there's nothing like SQL Server Data Tools.
- fish_fan 9y agoHow is the JSON integration and geometry primitives? I had no idea it was competitive with postgres.
- horusthecat 9y agoI would consider using it because: 1. I work in a backwards enterprise shop where "no one ever got fired for choosing Microsoft" and it would be easier (read as "possible) to get IT here to support it than Postgres. (That said, they do support Mongo internally but won't admit that to software teams) 2. It's much cheaper than Oracle, which is the other "enterprise" database where it's easier to get an install done 3. It's not Oracle
- 131012 9y agoCan you elaborate on point 3? If the argument is ideological, I get it. I'm more interested in the technical argument.
- protomyth 9y agoThere is another argument for or against adoption of Oracle and that is a basic business argument. Oracle is expensive and their virtualization costs are well above Microsoft.
- dotancohen 9y agoNot the OP, but licensing comes to mind. MSSQL licensing and Windows Server licensing are a pain, especially in virtualized environments. But Oracle? The word predatory - complete with claws and fangs - comes to mind.
- cwyers 9y agoOracle is a fine enough database (it really is), but it costs an exceptional amount of money and (I haven't touched it in a long time so I may be out of date on this, but I don't think I am) the developer tool experience is not great. Oracle SQL Developer is ugly and slow compared to SQL Server Management Studio. Basically, if you've used both Oracle and SQL Server you can tell which company had their CEO on stage shouting "developers developers developers" and which is run by the lawnmower.
- neilsimp1 9y ago> Oracle SQL Developer is ugly and slow compared to SQL Server Management Studio This cannot be said enough. I've recently changed positions to a team using Oracle, coming from MSSQL, and dammit if I don't hate SqlDeveloper.
- Beltiras 9y agoWhy would I invite that headache when I can just install PostgreSQL instead? https://www.pg-versus-ms.com/ https://www.pg-versus-ms.com/ says it all.
- Spivak 9y agoBecause you have to buy your PGS support from a 3rd party partner rather than from the vendor.
- scoj 9y agoThe certificate has expired, Chrome gives a nice ugly warning. But thanks for the link, I'm curious.
- beefhash 9y agoI just sent an e-mail about that to the person running the site, assuming the e-mail address in the top right is relevant.
- Beltiras 9y agoI sent the author an email. It's just a plain HTML page behind the expired SSL.
- discreditable 9y agoAnother poorly configured Let's Encrypt client. :(
- cafard 9y agoNot really. We have a number of SQL Server databases where I am, for a number of reasons. Several are for Microsoft Dynamics. How does that work with Linux? One is for print-management system, which I suspect has hooks into Windows.
- AnIdiotOnTheNet 9y agoNo. It won't save us on licensing costs and it won't be more secure, so the only reason I can see that it exists is for cloud hosting, and my organization has no interest in that.
- olavgg 9y agoNo, because PostgreSQL has much better documentation.
- james_anderson 9y agoThat's a new reason, I like it. Books Online has got better over the years to be fair to it.
- way0utwest 9y agoPerhaps. There are tons of SQL Server sites and articles to provide information and details the docs lack. Plus, the MS docs are now on Github and we can submit PRs to correct and expand things.
- snuxoll 9y agoWould I? Yes, I would. We're primarily a .Net / MSSQL shop, our DBA's are all familiar with MSSQL and all but a handful of our applications (internally developed or purchased from a vendor) use it. We just build a giant new MSSQL cluster using AlwaysOn, configuration management with Windows Server Failover Clustering (which AlwaysOn is built upon for some low level functionality) is a HUGE pain in the butt. If SQL Server 2017 was GA at the time I would have highly suggested we just go with RHEL because Pacemaker/Corosync is a lot easier to deal with. Out of personal preference, I like PostgreSQL a lot better - but when your business already runs MSSQL having options for deployment outside of Windows Server is a welcome change.
- james_anderson 9y agoAs good as Pacemaker is I don't really like the look of using it to achieve HA for SQL Server. Hopefully this will be better in 2018.
- _jezell_ 9y agoDepends if Microsoft would consider open sourcing it so it can catch up to everyone else.
- slackfan 9y agoI actually have been running SQL Server for linux for the past few months. In a docker container, no less. This is entirely for testing a part of our application that needs to connect to legacy mssql servers. The server is spun up, databases are created programmatically, tests are run, and then the container is destroyed. As for running this in production, ahahaha no.
- coding123 9y agoI was in this thread looking for this reply. If nothing else, the ability to run code on your Mac laptop running MSSQL server in docker is a huge win, even for what may later be a Windows deployment of MSSQL server. I definitely see the use-case for automating QA workloads and running tests against a real MSSQL server on what is otherwise a fully Linux based build system. The cheapest way to run MSSQL server (TCO which includes the human cost) is still likely Windows, but the docker-izing of MSSQL opens up soo many doors now. That all being said, I would expect that there are also companies moving to use MSSQL in Linux for production as well, but personally, I would wait a couple of years to hear other's experiences.
- slackfan 9y agoYeah, it's pretty great. We evaluated spinning up RDS MSsql instances for our testing, and found the time that it took to spin up one of those to be extremely prohibitive for use with CI pipelines, I mean something to the tune of 20 minutes for the instance to come up. Whereas with docker and mssql-linux, we only have to (at most) have a 10-15 second delay before the container is fully online. Definitely great for devs to run their local tests against, and great for me to be able to do some minor admining via the CLI tools provided in the container.
- flachsechs 9y agoso is your apprehension because of sql server on linux, or because of docker, or because of the combination of the two? this post is snarky but lacks real information.
- 9y ago
- kelukelugames 9y agoRelated question. Where can i run and host a SQL db for free? Or for cheap. It's for a hobby project.
- actuallyalys 9y agoFor a hobby project, you can probably use whatever is running the rest of your project. Sqlite in particular is lightweight. If you need hosting, I've heard good things about Digital Ocean, Vultr, and Linode. You'd have to install the database yourself though.
- dotancohen 9y agoDepends on the hobby. You can run one on your desktop, or if you are using a web host they most likely include database as part of the plan.
- fmariluis 9y agoHeroku Postgres has a free plan (10k rows): https://www.heroku.com/postgres https://www.heroku.com/postgres
- equasar 9y agoI don't know a free service but you can run Azure SQL for less than $5 a month. If you sign up for a 'Developer Program Benefit' in Microsoft, you'll get $25 every month for Azure.
- teilo 9y agoYes, absolutely, because of Microsoft's licensing model for HyperV. Windows Datacenter Edition is not cost effective for us, and that means we only run two Windows instances per host. By moving MSSQL to Linux, we can free up a Windows Server Standard license for other purposes. You can run as many non-Windows instances on HyperV as your want, but you can only run 2 Windows instances unless you pay to license every physical core on the server a second or third time, even if you are not using them for Windows (for example, if you wanted to run a third Windows instance on a host.) This means we have additional hardware capacity that we use to run Linux instances next to the 2 allowed Windows instances.
- way0utwest 9y agoBe careful here. I suspect that licensing terms may change a bit with this. However, you are mistaken. Windows Server standard allows 2 VMs (plus the host). Datacenter allows unlimited VMs. If someone told you otherwise, that's incorrect: http://www.microsoftvolumelicensing.com/ProductResults.aspx?doc=Product%20Terms,OST&fid=27 http://www.microsoftvolumelicensing.com/ProductResults.aspx?...
- teilo 9y agoNo. The licensing terms changed from per socket to per core. Other than that, the rules are the same. If you virtualize Windows Server, you must pay for core licenses for every physical core of the bare metal, regardless of which hypervisor you are using (HyperV, ESX, Xen, etc.). You may then run 2 Windows Server VMs on that host. If you want to run a 3rd, you must relicense every physical core on the machine a second time. You can then run up to 4 Windows Server VMs on that host. The licensing terms you linked to are for Windows Server VMs. When the licensing documents refer to an "OSE," they are referring to a Windows Server Operating System Environment. They are not referring to other OSs you may be running on the same host (remember, the host can by any hypervisor). Non-Windows VMs are not relevant to Windows licensing, even if you are using HyperV to host them. The only difference between using HyperV and other hypervisors is: IF you are installing the HyperV role on a Windows Server, and only using it to manage HyperV, you don't have to count that bare-metal Windows Server against your license count, provided you are running Windows Server VMs on that host. Remember, there is also HyperV Server, which is console-only, and free, but fully functional, and managed just like any other HyperV server. It is a slightly scaled down version of Window Core. You can run as many non-Windows VMs on that as you want, without paying a cent, or pay for Windows VMs according to the above rules.
- igtztorrero 9y agoNuts
- peterwwillis 9y ago"Would you?" Of course. "Will you?" Of course not.
- statictype 9y agoProbably not. We use SQL Server for our product running on AWS and we tested it with the Linux edition and it works fine. But what’s the advantage of moving it over to Linux. It’s anyway sitting on a dedicated box and Windows Server hosting charges are only marginally more expensive than Linux on AWS(depending on the AZ you use). So it’s cool and works well but there’s no compelling reason for us to move to it yet. At least not one that I could see
- james_anderson 9y agoDo those charges include the cost of Windows licenses?
- jasode 9y agoIf I put on my "CIO" hat, I would say "no". An observation from several decades of the software business is the concept of the "reference platform". For MS SQL Server, the reference platform is Windows, not Linux. This means that if development for the different operating systems gets out of sync, it will be the Linux version that lags instead of Windows. If I have an urgent crisis with a database down and need to call MS tech support[1], their troubleshooting team will be way more familiar with Windows than Linux. It's really a bad idea to deploy on a non-reference platform. For playing around and experiments, that's ok. However, for deployment on production environments, it's a risk. The "reference platform" for MS Windows NT was x86, not MIPS or DEC. Therefore, we didn't deploy Windows apps to MIPS machines. (That was a good decision since MIPS, DEC, and Itanium versions of Windows got cancelled.) Solaris reference platform was their SPARC computers and not Intel x86. Yes, Solaris had a version ported to x86. That was ok to play with at home but we wouldn't deploy any commercial production apps with it. Same for dev environments. If you're using C#, your life will be easier if you go with Windows instead of "C# NET Core" on Linux. If you're programming Ocaml, stick with Linux instead of trying to cobble together Cygwin+MinGW to deploy Ocaml apps on Windows. Try to stay with the reference platforms to minimize headaches. [1] https://www.microsoft.com/en-us/microsoftservices/support.aspx https://www.microsoft.com/en-us/microsoftservices/support.as...
- james_anderson 9y agoThat is a worry. I guess it could depend on the uptake of SQL Server on Linux though.
- petraeus 9y agoThis. You always want to stay as close to standard as possible. Cowboy technology and too clever by a half solutions have no place in enterprise.
- manigandham 9y agoSupport is support, Microsoft is very comfortable with Linux and uses a lot internally already. They're also partners with Redhat which is what most enterprises will use anyway. MSSQL also runs on a abstraction layer since v2005 so there's no inherent problem with running on Linux. Also containers change the entire scenario.
- taf2 9y agoNope
- NDizzle 9y agoMy organization is not, because our SQL Server DBAs with 20 years of experience are linux newbies.
- kurinj 9y agoIf SQL Server is what the clients/users required, sure. I'd much rather run it on a Linux server because that's what I'm familiar with.
- manigandham 9y agoYes. .NET based startup, everything else is already .net core (containers + kubernetes on GKE) so we only have Windows for MSSQL. Looking at migrating to Postgres but MSSQL in containers sounds great so far. Features are good with both databases but built-in graph, columnstore, hekaton, better backups, etc in MSSQL are strong temptations.
- severino 9y agoNo, I won't. We use SQL Server only in some legacy projects, but newer ones are using Postgres or Oracle, running Linux. We know open-source RDBMS like Postgres, and the ones developed by Unix/Linux vendors like Oracle, are unlikely to drop Linux support anytime soon. But can we say the same about MSSQL? Today we got this CEO... but tomorrow? It's a risk we're not willing to take, specially when there's no SQL Server feature that we cannot find elsewhere.
- kapauldo 9y agoI would not consider it today because today it's closed and expensive. I can't get support on stack overflow for example. In a few years I might consider it.
- Garvey 9y agohttps://stackoverflow.com/questions/tagged/sql-server+linux https://stackoverflow.com/questions/tagged/sql-server+linux Why can't you get support on Stack Overflow?
- gjvc 9y agoLink to the announcement: https://blogs.technet.microsoft.com/dataplatforminsider/2017/09/25/sql-server-2017-and-red-hat-enterprise-linux-offer/ https://blogs.technet.microsoft.com/dataplatforminsider/2017...
- grin1dan 9y agoI am new to this and would appreciate an update on where to find a 'how to' for doing this. Thanks very much!