What’s next for the Business Intelligence professional, as they learn about Linux? Here, we will connect SQL Server Management Studio to the Linux edition of SQL Server. I’m expecting you’ll have completed the pre-requisites laid out previously.
Connect SQL Server Management Studio to SQL Server Linux
- In the Azure Portal, navigate to the SQL Server on Linux Virtual Machine. Mine is called 773SQL because I created it to prepare for the 773 exam.
- Select the item Network Interfaces on the left hand side.
- On the main panel, select the Network Interface
- Next, look for the Network Security Group, which you can see under ‘Essentials’ on the right hand side.
- Click on Add and Give the rule a name: SSMSRemoteConnections will be fine, if you can’t think of a name
- Under Service, select MS SQL
- Make sure TCP is selected
- Port Range should read 1433
- Select Allow and click OK
Your inbound Security Rule has been created. Now, let’s connect to your SQL Server Linux machine.
Get your Virtual Machine IP address from the Azure Portal
In this section, we will get the IP address of the Virtual Machine that’s running SQL Server on Linux.
In the Azure Portal, navigate to your Virtual Machine
If it isn’t up and running, you will need to start it. When it’s running successfully, click on the Connect button.
You will get a message that looks like the following item:
Make sure that you keep a note of the IP address. You will need it to connect SSMS to the SQL Server Linux Virtual Machine. In this example, the IP is 188.8.131.52. I have it set to Dynamic and the VM will most likely be gone by the time this blog is published…. so don’t bother trying to connect to this IP address here. You must use your own, obtained by following the previous step.
Connect SSMS to the SQL Server on Linux VM
Here is an example of how it should look – obviously you will need the password!
The IP Address was obtained from the Azure Portal
You will need to use SA
You will need to use the Password that you used when you set up the Azure Virtual Machine
Click connect and you should see your SQL Server now, as normal.
Let’s double check, shall we?
Checking the Version
Open a New Query window
Enter the Query: SELECT @@VERSION
Execute the query, and take a look at the results:
In the next blog in this series, let’s take a look at how we can get a database up to the SQL Server on Linux Virtual Machine, and then how we can restore it. We will also look at a potential pitfall or two.
The Previous Post is here