Live data from Hacker News

Ask HN: Would you consider running SQL Server on Linux?

news.ycombinator.com

51–60 of 90 posts

Re: Ask HN: Would you consider running SQL Server on Linux?

#51
post #18

Would 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 Se…

As 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.

Re: Ask HN: Would you consider running SQL Server on Linux?

#52

No, 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.

I 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 nothi…

> PG just doesn't have the same quality SQL-dialect or tools as MSSQL though.

T-SQL sucks, I don't know how on earth you get the feel of "quality" from it. Every time I have to work with it I cry, pl/pgsql is a hell of a lot nicer and I can feel comfortable stating that as an objective.

As far as GUI tooling? Ya got me there, even as terrible as auto-complete is in SSMS it's leaps and bounds better than PGAdmin or DataGrip for pointy-clicky DBA tasks - though I've just learned to use the system tables/views in PostgreSQL like I have MSSQL because I can't stand pointy-clicky stuff.

> Some very basic facilities are missing from PG like snapshot and transaction logs

What? Snapshot isolation is available by default with PostgreSQL, it ONLY uses MVCC for transaction isolation. You want snapshot, set your transaction isolation level to REPEATABLE READ. And transaction logs? What on earth do you mean? Transaction logs are fundamental to PostgreSQL like they are any other RDBMS, you can ship them off for backups, do PITR with them, etc - just like you can SQL server.

> batched triggers

Yup, that's true.

> being able to return multiple resultsets from a single trip to the database server.

Technically doable with stored functions in PostgreSQL, though ill-advised. SQL Server makes this easier if you need it, for sure.

> there's nothing like SQL Server Data Tools.

Yup, although this is really down to a matter of preference. SQL Server Data Tools is great for warehousing projects, but for application databases using the database migration tools provided by your framework of choice work just fine.

And hey, I've got respect for MS SQL Server, it's a well-performing, well-supported enterprise SQL database - not to mention SQL Server Analysis Services kicks some serious ass for business intelligence use-cases (especially considering it's included right in the package, and with the new PowerBI-derived Reporting Services you get a full BI package for a really good deal). But let's make sure we're all educated on tools before we start nitpicking them, eh?

Re: Ask HN: Would you consider running SQL Server on Linux?

#53

Probably 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. A…

Do those charges include the cost of Windows licenses?

Re: Ask HN: Would you consider running SQL Server on Linux?

#54

Earlier quoted context omitted.

Cool, I've seen this mentioned as a potential reason, so it's good to hear of a real-world example

Just for my curiosity, do you work for microsoft?

No, but I am predominantly a SQL Server DBA. I thought people might think that after I posted.

Re: Ask HN: Would you consider running SQL Server on Linux?

#55

I 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.

I've been doing similar stuff with docker in my CI pipelines. So are you testing your app on Linux SQL Servers and then deploying to Windows SQL Servers? Should be OK...

Re: Ask HN: Would you consider running SQL Server on Linux?

#57
post #24

I 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.…

Can you elaborate on point 3? If the argument is ideological, I get it. I'm more interested in the technical argument.

Oracle 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.

Re: Ask HN: Would you consider running SQL Server on Linux?

#58

Earlier quoted context omitted.

I 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 nothi…

How is the JSON integration and geometry primitives? I had no idea it was competitive with postgres.

"JSON" in SQL server is a set of functions layered on top of NVARCHAR(*) columns, so - about where PostgreSQL was when they first introduced the 'json' data-type.

Can't say I've investigated the geometry types, but at a glance they're functional (if uglier to work with).

Re: Ask HN: Would you consider running SQL Server on Linux?

#59
post #49

Earlier quoted context omitted.

I 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 nothi…

You can return multiple result sets using a sproc or a view. Triggers sound strictly less powerful in SQL Server since "for each row" semantics is missing? Meanwhile there are many PG features missing.

> Triggers sound strictly less powerful in SQL Server since "for each row" semantics is missing?

Triggers in MS SQL are batched, you get "for each row" semantics by iterating over the contents of the virtual "inserted/updated/deleted" tables. This is honestly a pretty sane design choice, it helps trigger performance immensely when dealing with bulk data manipulation since you can do things like JOIN's on the whole set of triggered data allowing the execution engine to do one index scan or hash join instead of a bunch of index lookups on individual rows. Ironically, after doing salesforce.com development for a while this is one of the things I really wish PostgreSQL offered.

Re: Ask HN: Would you consider running SQL Server on Linux?

#60
Yes. .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.

Post reply on HN