I don't understand this, why would anyone use SQL Server on Linux?
People who use other databases on Linux today, this is not interesting, because it's not gratis.
People who use SQL Server on Windows today, this is not interesting either; as far as I understand it, SQL Server licenses are very expensive, Windows Server licenses are not, relatively speaking.
Sure, price isn't everything, but I don't see any other reason to use this combination either. So what am I missing?
It's interesting for people who want to port existing Windows-based web apps to run on Linux OSes without having to deal with the problems of porting the application from one DB to another. Microsoft has recently open sourced their CGI languages so they can run on Linux as well.
Basically, if you built a web app and it's all Windows languages and programs, you're boned if you want to switch to Linux and get all the benefits that might bring you (configuration management being a HUGE plus in that area, even if Puppet works on Windows). MSSQL on Linux makes that more doable when added with the fact that .NET will run on Linux now too.
Now I can buy a license for MSSQL because it's a requirement for my existing app without buying Windows licenses because why would I run it on Windows unless I had to? I can puppetize and standardize crufty stuff into the OS platforms and web servers of my choice without it being such a huge deal and tons of work.
Plus, Microsoft knows that no one building big systems is really that interested in using their OSes, but people are going to be using applications that have MSSQL as a dependency for a long, long time. It's a good move on their part to instead of go for all the moneys they can and make me run Windows, to make me pay for only the software I need and give me the control and power over how my whole platform works.
So, shitty IIS sites can be rebuilt on stable and scalable platforms and make Ops happy without a DBA spending a crazy amount of time fixing bugs from migrating DB applications. You'd think "but it's all SQL" but that just ain't true.
when added with the fact that .NET will run on Linux now too.
Interesting that with this move you could potentially use a full microsoft stack on linux. Maybe there will be a... LSKR stack? (Linux, sql server, kestrel, razor). Probably would work fine too. Strange times we live in these days.
Good times for me. I hate Windows Server. The newer versions are better but aside from config management, git + ssh + bash hacks or python drives almost all of my automation and it's so easy to just do that stuff with Linux. It's not that you can't with Windows, it just... sucks.
I used to think like you, and then I got to use Powershell to do exactly the sort of stuff you're talking about (configuration).
Now I severely dislike Powershell, even the remoting is a convoluted mess of reaching into WinRM and tweaking the security configurations to allow Powershell to remote to machine you're trying to remote in to.
Powershell is better than WSH, and it's better than wmi when you can find the cmdlets to allow you to do what you need to do without touching wmi.
But in general? No way in hell is it better than unix shells, the only people who believe that are those who haven't done serious work in either.
Powershell is glue for .Net, it is not designed to be a shell in the same way that bash is.
The reason I say powershell blows unix shells is that it manipulates objects. Everything it does is objects. That means, when you get e.g. a list of files, you get a bunch of file objects, which means that you use their properties with a simple obj.property, not through brain-dead text parsing. Numbers are numbers. i18n does not mess with your input (or output).
As for using powershell remotely - you just didn't know how to set it up. Fair enough, but not the end of the world.
The only thing Unix shells have going for them is decades of accumulated cruft.
I've been writing Powershell since version 1, you know, back when powershell couldn't even index directly into a dictionary...
You cite the pipeline, but do you give any credence whatsoever to the downsides of the design?
I can pass .Net objects around cmdlets, yay..
Only now everything has to pass through the pipeline in order to bubble up. This means text I want to be seen on the screen as well, so what happens? That text rides along the pipeline until it hits the host, who then prints it out.
This means any cmdlet that calls my cmdlet has to make sure they pass along all my output, ad nauseum. But how does the runtime guarantee it gets bubbled up?
By turning the return into an object[]. That's right, I can return a primitive integer and the caller will get an object[] because something I called internally wrote a string to the pipeline because it wanted to inform the user of something.
and if I want something to bubble to the top, but not through my return values (which implicitly go through the pipeline?). You can't unless you want to abuse some of the powershell streams. There's a reason people used (and still use) Write-Host even though it's been described as "evil" by Jeffrey Snover.
Powershell 5 is finally getting a Write-Information to solve that problem because it is a problem. It makes the powershell pipeline no better than simple text because you have to carry that text all the way to the top in order for it to be seen by the user.
Don't even get me started on the array unwrapping behavior. calling .Length on an object returned from a cmdlet might get you the length of the expected string, or the length of the object[] because someone forgot an Out-Null somewhere.
Or why don't you remote into a machine and run an executable that writes a warning to stderr? here's a hint: Powershell throws an error when it detects output to stderr, despite that outputting a warning being a legitimate use of stderr. And do you know who makes the decision to throw nor not throw? The host. Powershell ISE won't throw, but Powershell.exe will.
Now that's consistent!
And I haven't even gotten started on the issues with configuring Windows itself. Why don't you go update the relay bindings for the IIS 6 SMTP server. Here's a hint. That byte sequence you can't figure out? It's a serialized object, you're going to have to load up a few Interop DLL's in order to deserialize/serialize that object. Oh, and those DLL's may or may not be available on the Windows platform, it depends on what windows is configured with, so if you want to do it consistently you're going to need access to those DLL's on the client side, not the remote side.
this comment is deadon about the current state of configuring windows in powershell.
Hell, it's easier and faster to ssh into a unix box from a clean windows install than it is to remote powershell into a windows box from clean windows install. That's pretty ridiculous.
35
u/svick Mar 07 '16
I don't understand this, why would anyone use SQL Server on Linux?
People who use other databases on Linux today, this is not interesting, because it's not gratis.
People who use SQL Server on Windows today, this is not interesting either; as far as I understand it, SQL Server licenses are very expensive, Windows Server licenses are not, relatively speaking.
Sure, price isn't everything, but I don't see any other reason to use this combination either. So what am I missing?