This article is intended to provide resolution/suggestion in case you face problem while connecting to SQL Server 2012 Express edition (installed on Windows Server 2008 R2) either through SharePoint or SQL Server Management Tool (from other server) or Source Code or anywhere else. I want to emphasize here this problem may not be specific to any version (of OS, SQL, MOSS,...), so resolution suggested here could be generalized.
Recently I was installing SQL Server 2012 Express and SharePoint 2013 Preview on Windows Server 2008 R2. During configuration of new SharePoint farm, I supplied the SQL Server Name, SharePoint Config DB Name and Credential to connect the SQL Server and to proceed further. Somehow I was not able to connect SQL Server from SharePoint Configuration Wizard.
There could be multiple reasons why user may not be able to connect SQL Server from remote application(s). I have observed below are the common points could be possible reasons behind the connectivity issue:
- Check 'Windows Firewall' setting under Control Panel
- Check 'TCP/IP' status under SQL Server Configuration Manager
- Check 'Net Logon' status under Services Control
1. Check 'Windows Firewall' setting under Control Panel
Windows Firewall is a software component of Microsoft Windows that provides firewalling and packet filtering functions. It helps protect your network from hackers and malicious software.
Go to Control Panel and click on Windows Firewall. Check whether firewall is turned On or Off. You can turn Off the firewall to resolve the issue, but it can be suitable only for development purpose as firewall cannot be turned off in the production server.
So keep your firewall On and create an inbound rule to allow SQL port to be connected from remote applications. For this follow these steps:
- Go to Advanced Settings of Windows Firewall
- Select Inbound Rules from the left pane
- Click on New Rule... from the right pane
- Select Port under Rule Type step and click Next
- Select TCP and give Specific local ports (under which your SQL instance is running, by default it will be 1433) under Protocol and Ports step and click Next
- Select Allow the connection under Action step and click Next
- Keep ALL check box selected under Profile step and click Next
- Give Name and Description under Name step and click Finish
2. Check 'TCP/IP' status under SQL Server Configuration Manager
SQL Server 2012 Express and Developer Edition do not allow remote connections by default. TCP/IP should be enabled for remote connection. To do so, follow bellow steps:
- Expand Configuration Tools from Microsoft SQL Server 2012
- Open SQL Server Configuration Manager
- Expand SQL Server Network Configuration
- Click Protocols for <Instance Name>
- Right-click TCP/IP and then click Enable from the right pane
- The icon for the protocol will change to show that the protocol is enabled
3. Check 'Net Logon' status under Services Control
Net Logon maintains a secure channel between this computer and the domain controller for authenticating users and services. If this service is stopped, the computer may not authenticate users and services.
Go to Run command window and type services.msc. Look for Netlogon service. If the service is stopped, Start the service.