Configuring SQL Server 2017 for Rider

Rider is not only a great .NET IDE, it also is a wonderful tool for working with databases that are associated with .NET Core solutions. Many .NET Core developers use Microsoft SQL Server on their laptops; more specifically, the Developer edition of the database server tool. Let’s start a series of blog posts about Rider’s database tools (powered by DataGrip)!

Before you can start using Rider with a SQL Server database, you may discover that you must configure SQL Server 2017 to allow Rider to connect through a TCP port which is not set up at install. In this post, let’s look at configuring SQL Server 2017 Developer Edition to allow Rider to work with the server and databases.

This post is part of a series around working with databases and data in Rider:

Enabling SQL Server TCP/IP connections support

SQL Server Configuration Manager is the tool that manages the services that SQL Server uses for network connectivity and protocols. You will need to start this tool from a command line. The manager will not show in the app list in Windows since it is a snap-in for the Microsoft Management Console program and not a stand-alone app. Run the command C:\Windows\SysWOW64\SQLServerManager14.msc for SQL Server 2017.

Note: If you are running SQL Server 2016 or 2014 run the commands C:\Windows\SysWOW64\SQLServerManager13.msc and C:\Windows\SysWOW64\SQLServerManager12.msc respectfully.

You will then see the SQL Server Configuration Manager. We will need to work in the SQL Server Network Configuration section so expand and select Protocols for <Server Instance Name>. For the developer edition, you will have Shared Memory, Named Pipes and TCP/IP protocols. The only protocol enabled will be Shared Memory.

SQL Server Configuration Manage

The first thing we need to do is enable the TCP/IP protocol. Double-click the TCP/IP protocol in the list of protocols listed for the installed server to show the TCP/IP Property dialog. In the Protocol tab, enable TCP/IP through the Enabled property.

SQL Server Configuration Manage TCPIP Properties

In the IP addresses tab, you will locate a set of different IP settings. Go to the end and find the IPAll set of properties. If the TCP Dynamic Ports property for TCP/IP in IPAll is 0 this means no ports have been assigned and you will need to clear the property. In the TCP Port property add the port number you want to use. I will use the default number 1433 for my local SQL Server 2017 instance. After setting both properties and confirming with OK, you may get a prompt notifying you that you need to restart the SQL Server service.

SQL Server Configuration Manage TCP Ports Set

Finally, you will need to restart your SQL Server service in order to have the TCP/IP protocol and port to be enabled and listening. In the SQL Server Configuration Manager, select the SQL Server service from the list to the right, right click on that service and select Restart.

SQL

You should now be able to use Rider to connect to your local instance of SQL Server 2017, create Data Sources and work with the databases located on the SQL Server. In our next post, we’ll start doing just that. Stay tuned!

Download Rider and give it a try! We’d love to hear your feedback!

This entry was posted in How-To's and tagged , , , . Bookmark the permalink.

4 Responses to Configuring SQL Server 2017 for Rider

  1. Andrey Berezniker says:

    That’s great and very useful feature!
    But please fix the issue https://youtrack.jetbrains.com/issue/RIDER-13626 with missing “explain plan” menu option. Bug is still present at latest nightly build #RD-181.4035.375,

    • Chris Woodruff says:

      Thanks Andrey for the comment about the post. Hope you enjoy the remaining posts in the series. Regarding the bug in Rider, we are looking into it right now. I appreciate you bringing it to my attention and I will keep you updated on it.

  2. Stefan says:

    How can i do this on ubuntu 18.04 using terminal? Is it possible to do that?

Leave a Reply

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