상세 컨텐츠

본문 제목

Visual Studio For Mac Sql Server

카테고리 없음

by arsilmulrucreve 2021. 5. 27. 19:20

본문

After the release of the first public CTP of SQL Server v.Next for both Windows and Linux, I thought I would share how I set up a coding environment without Windows – Visual Studio Code, running on my Mac, connecting to SQL Server v.Next on Ubuntu, hosted within a Docker container.

  1. Mssql sql sql-editor sql-server sql-tools visual-studio-code vscode mssql for Visual Studio Code was added by ericskang in Nov 2016 and the latest update was made in Nov 2016. The list of alternatives was updated Feb 2018 There is a history of all activites on mssql for Visual Studio Code in our Activity Log.
  2. SQL Server Development on Mac (Using Docker, Valentina Studio, and Visual Studio for Mac) Tired of depending on Windows to develop SQL Server powered applications? This tutorial is for you.

Just last year I got my first Macbook Pro for development, after a lifetime of Windows (and linux/unix on server environments). I was very excited to get my environment set up as many friends who work in a similar field had sworn by it. I knew that almost every element of my workspace would be easily transferrable to OSX, and in some cases more elegantly. Technologies such as Apache, PHP, ssh/shell, etc are almost more native to the *nix core than they are to windows.

There was however a single piece of the puzzle that I knew I still had to deal with. Microsoft SQL Server. My work use it, personally I woudln’t choose it for my own projects at all, I’d choose something less platform dependent. Having said that I actually don’t mind the product OTHER than it’s requirement to be run on Windows. It is a decent product, it’s professionally supported, and most of the clients in my industry use it. In fact not so long ago some may argue that it was one of the best choices for large systems. It was FAR superior to the well known MySQL and a lot more affordable than Oracle. Let’s not forget it was originally bought from Sybase (which is probably why the product isn’t all that bad! Microsoft didn’t create it!)

So basically I needed to use MS SQL Server. I have a seperate windows box with an SQL Server instance on it, and what I needed was a client program that could connect to the server so I could query it, write SQL, interrogate data etc. I needed the equivalent of Microsofts SQL Management Studio (which used to be called “Query Analyzer”), or “MySQL Workbench“.

VisualVisual studio for mac os

One option of course was to install VMWare, install Windows, install Microsoft SQL Server and just use Microsofts native client. But I really didn’t want to do that. So after much reading & researching I narrowed my options down to a few potential candidates:

So I tried all these products, and here’s the problem. They’re ugly. They’re clunky, awkward and … ugly. Most likely because they’re Java based – but they’re just hideous. When you get used to an environment like MS SQL Server, you just can’t revert back to this kind of rubbish. It’s funny you know, when you research this stuff, you see a lot of people recommending these products. And after using them you immediately realise that these people either a) come from an old school linux or java background where everything is ugly and they’re used to it, b) they’ve never worked with large or complicated datasets where EFFICIENCY is of utmost importance and probably consider phpMyAdmin suitable for data wrangling.

But the problem is they’re not ok. I’m sorry, they’re just not. They’re unpolished. There are real annoyances – the forms are hideous. The result set grids will have 10px padding so you can only see about 5 rows of result sets, or the result set grids cells don’t automatically resize to the width of the content within the cell (within reason) – they just don’t cut it. It’s situations like this when you realise the word ‘enterprise’ actually does have a meaning beyond just being a buzzword!

I was about to lose hope then all of a sudden, another contender crossed my path:

It was beautiful – I was in love. It’s a completely professional, sexy, clean, efficient, enterprise grade, high end. powerful SQL interface. It’s actually quite close to Microsoft’s native client in feel. I got it all hooked up, everything was working well, I even connected over mmy SSH tunnels to remote clients (an article on that later). It was all looking good until I ran into a problem. Running some stored procedures gave an error.

Sql Server Data Tools 2017

Studio

It turns out that SQL Developer is fine with standard SQL like SELECT, INSERT, UPDATE, DELETE etc, but when running certain SQL Server specific commands, SQL Developer doesn’t know how to interpret it, or interprets it correctly. A common problem seems to be the BEGIN and END keywords. It also can’t handle multiple resultsets returned from a stored procedure, and won’t handle the “go” command in SQL Server scripts.

Visual Studio For Mac And Sql Server

So unfortunately in the end I installed Windows XP (for it’s light weight), MS SQL Server and just use the native Microsoft SQL Management Studio. Given that my brand new Macbook Pro handles this without struggling it’s actually a fairly reasonable solution, but I cross my fingers that one day Oracle SQL Developer is completely compatible, or that someone makes a worthwhile GUI.

Sql Server Vs Code

It’s worth mentioning that if you do fairly straight forward queries without very large datasets or without complex SQL, some of the above products may well be suitable for you, I’m happy to answer any questions you may have in the comments.

Edit (6th Jan 2015): It looks like some developers by the name of Hankinsoft ran into the same issue as many of us and have actually gone ahead and developed an MS SQL Client for Mac to address this very issue. The product is called SQLPro for MSSQL and although I’ve only recently started using it, I have to say so far it’s very impressive. It’s polished and pleasing-to-the-eye with it’s native Mac App design & feel, but at the same time is fast, responsive, efficient and dedicated to the task. It’s described as ‘lightweight’ and that’s what I love about it – so far, it’s handled everything I’ve thrown at it (including cross database joins etc), but isn’t overloaded with unnecessary features/preferences/bloating. So far I definitely recommend it.

댓글 영역