Configuring SQL Server Express

After you finished installing SQL Server Express, you have to make some basic configurations, so you can connect easily from your Visual Studio and your application. To do this, you have to use SQL Server Manager. With Express edition of SQL this small app is a bit hidden and have no default shortcut, but don’t worry. Browse your Windows directory and in SysWOW64 folder you’ll find SQLServerManager12.msc (if you installed SQL Server Express 2016, this could be SQLServerManager13.msc or some higher version number in filename).

After starting this manager, you’ll get to this screen:

SQL Server configuring Step 2

In SQL Server Services you’ll see all installed instances of your SQL Server. I have 2 instances: the default MSSQLSERVER and CSHARP. Both are running as you can see. The agent and the browser are not important for us now.

Open SQL Server Network Configuration and choose the protocols of your instance (now I choose my CSHARP instance):

SQL Server configuring Step 2

It will make your life easier, if you enable the TCP/IP protocol on your instance (which is disabled by default) while you’re developing application in Visual Studio. Double clicking on TCP/IP protocol will open this window:

SQL Server configuring Step 3

Switch the Enabled property to YES, click on IP Addresses tab and scroll down to IPAll part. This part has 2 lines: TCP Dynamic Ports (which is 0 by default) and TCP Port (which is empty now). Type 1433 in the TCP Port line (this is the default port number of SQL Server service):

SQL Server configuring Step 4

By clicking OK you’ll get a notification that you’ll have to restart the service in order to take effect. Let’s do this: back to the SQL Server Services part, choose your running SQL Server instance, right click and Restart. That’s all.

SQL Server configuring Step 5

Now your SQL Server is ready to use from Visual Studio easily.