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:
- Configuring SQL Server 2017 for Rider
- Getting started with database support in Rider
- Working with Tables and Indexes in Rider
- Working with 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
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.
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.
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.
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.
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!
Subscribe to Blog updates
Boost Code Quality with Qodana and GitHub Actions
It’s been roughly half a year since we introduced Qodana to .NET in our blog post about how to elevate your C# code quality with Qodana. Since then, we’ve been quite busy! Qodana went out of preview and into GA. Furthermore, we greatly improved the integration with our IDEs, providing an effortless …
Critical Thinking in an AI-Powered World
Critical thinking techniques for use with JetBrains AI Assistant.
How To Use AI Assistant to Generate Test Data For .NET Applications
How To Use AI Assistant to Generate Test Data For .NET Applications for better unit tests.