SQL Server 2017 (on Linux) in Mac Docker – Part 3

Hello Friends!

In continuation to my previous 2 blogs (Part 1, Part -2) on same topic, this is last in series. I’ll continue my experiment with SQL Server 2017 (on Linux) sitting on Mac Dockers. So far everything is working as expected and it’s time now to have a real fun with Microsoft Visual Studio placed on my Mac. After that I’ll be able to state, all Microsoft technologies are good to go hand in hand my Mac when it comes to database solutions building.

I’ve already install Microsoft Visual Studio on Mac. You can download from here. It’s pretty straightforward.

Next step to install mssql for Visual Studio Code

Connect in Visual Studio Code

After completing installation of mssql in VS Code, let’s begin with creating a new sql file.

Screen Shot 2017-11-05 at 12.13.05 PM

Screen Shot 2017-11-05 at 12.13.43 PM

  1. Press F1 to pull the command pallete
  2. Type MSSQL drop down list will show all commands related to keyword go for “MSSQL:Connect”
  3. Start putting parameter one by one as poped up.
  4. End create a profile so everytime you run and command against your SQL Server 2017 docker all configuration details are already saved. It will avoid to put same information at every instance/each query.

Ex:

Server name:  localhost 
Database name: master 
User name: sa 
Password: admin@123 [Save Password (yes or no)]
Profile name: Mac-Docker

Same connection status is visibale at lower right hand corner of the IDE when it’s connected successfully. Something similar most of us are acquaintend in SSMS.

Screen Shot 2017-11-05 at 1.34.24 PM

A simly on extreme right end confirms the success.

Play around with DB objects

Let’s quickly walkthrough how much similar VS Code is to SSMS. I’m going to create a database, a table, insert values and fetch them back. Very basic activity as it’s my first time with VS Code on Mac & of course for SQL Server 2017 docker on Mac OS.

select @@VERSION
GO
create database AvanishPanchal
GO
USE [AvanishPanchal]
GO
create table [SQLServerDocker] (nameOfDoc varchar(100))
GO
insert into SQLServerDocker values ('FirstDockerOnMac-SQL2017RTM')
GO
SELECT * from SQLServerDocker
GO

Screen Shot 2017-11-05 at 1.39.52 PM

Wow! Things are pretty much similar with little fancy. So far so good and DevOps team is all set to go with development work without having any dependency on other groups, traditionally.

Happy Learning!

Avanish Panchal
Regional Head – DataPlatformGeeks & DPS2017 Core Team Member
Like us on FaceBook | Join the fastest growing SQL Server group on FaceBook

Follow Avanish Panchal on Twitter | Follow Avanish Panchal on FaceBook

 
Data Platform Virtual Summit 2020

Subscribe to SQLServerGeeks YouTube channel. If you want more learning content in your inbox, subscribe to SQLServerGeeks Bulletin.

SQLServerGeeks YouTube | SQLServerGeeks Bulletin | SQLServerGeeks Twitter

Avatar

About Avanish Panchal

Avanish carries around 15 years of experience in IT industry. He is post graduate in Computer Science, followed by Masters in Business Administration. He has worked on multiple technologies like SQL Server, .net & Sybase with world largest bank(s)/IT consulting firm(s) like JPMorganChase, CapGemini, Datamatics etc. Currently holds position of Database Architect in BioPharma Global Leader. His area of focus are SQL Server DB Engine, Security, Storage, Virtualization & Infrastructure Consolidation. Passionate for delivering Database IT Infrastructure to satisfy and exceed the needs of the enterprise. You may find him active on various forums like SQLBangalore, SQLServerGeeks & many more. His SQL Server passion helped him to be the Core Team member of Asia's First SQL Server Conference in 2015 @ Bangalore (#SSGAS2015).

View all posts by Avanish Panchal →

Leave a Reply

Your email address will not be published. Required fields are marked *