[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 77
  • Last Modified:

SQL Server 2008 R2 client won't connect to Server

Using a reservation app on Win 7 using SQL server 2008 R2.
Client also has SQL Server 2008 R2

Server works 100%

The client won't connect.  Also Win 7 + SQL server 2008 R2. I have attached error msg and both svr & client ini files.
Can ping server from client
Ensured the server has 'Allow connections' ticked.

Enabled TCP on server firewall. Opened port 1433 on server.  

Can't work it out
Error msgReservit.ini
Server.ini
0
sco505
Asked:
sco505
1 Solution
 
Russ SuterCommented:
It's possible that your SQL server instance isn't using the default port. A quick test would be to momentarily bring down your firewall and see if you can connect then. If you can then there is another port you will need to open.
0
 
QlemoC++ DeveloperCommented:
You'll also have to make sure the SQL Browser service is running. It is used to find out about the non-default port (using an instance name implies it is a dynamic, non-default port). SQL Browser requires 1434/udp.
0
 
sco505Author Commented:
I'll give both a go.  Let you know how I get on.  Take a couple of days to get there and fix
0
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 
Mohammed KhawajaCommented:
To find out what port SQL is listening to, open a command prompt as administrator and run the following:

netstat -aon -b

Scroll until you find sqlserver.exe and see which port it is listening on as well as which IP it is binding to.
0
 
sco505Author Commented:
Disabled firewall.
Browser is running
No luck.  Still getting same error.

Attached server netstat file.  Shows no IP for sqlserver.exeNetstat-Svr.jpg
0
 
QlemoC++ DeveloperCommented:
Port 1433 is fine and correct. Even without SQL Browser service the connection should get established (port 1433 is tried as last resort, even if using an instance name), it might just last a second longer.
The local application is using TCP on port 1433 too, so that works.

The ReservIt.ini contains this entry:  Data Source=.\sqlexpress
Server.ini: Data Source=\\\\reservit-pc\\sqlexpress
and both Provider=SQLOLEDB
Your screenshot however shows Provider=SqlNCli10.1; Data Source=192.168.1.25\sqlexpress

This info does not fit together. The first file refers to a local instance, the second has a misspelled data source (no leading backslashes are allowed), and the error message uses both a different data source and provider (Native Client 2008).
0
 
sco505Author Commented:
Thanks Qlemo.  All it took was to delete the 2 leading backslashes and now it works 100%
0

Featured Post

Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now