Win 7 suddenly cannot connect to sql server 2005

Hi All,

I have a really strange problem that has suddenly appeared

i can no longer connect to ANY sql servers either local or remote,

This may seem abrupt and i apologise but i just want to make it clear "ITS DEFINATELY NOT THE SQL SERVERS"

ive been connecting to the servers all day from my work pc, and another pc on my local home network also has no problem

i cant even set up a dsn, i get no timeout, it simply sits there with a wait cursor, i tried to set up a dsn about 45 minutes ago and its still on the the wait cursor,

windows firewall is off and no others are installed.

there have been no software changes and two weeks ago this problem didnt exist.

Can anybody suggest anything? i'm having a mental meltdown over this

Thanks in advance
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Are you running some antivirus software that might block outgoing port 1433 connects?

Are you using the server's respective Netbios name or FQDN or IP (i.e. is DNS working properly)?

Did you try to listen with wireshark on either your local PC's NIC or one destination servers in order to see if anything is actually leaving your PC in direction of SQL server?

Are you trying to connect via IP at all, and are the servers active for IP connections (default is sometime only havine named pipes, and no IP, or IP only on certain adapters etc)?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ChrissalterAuthor Commented:
The only antivirus that is running is AVG that was installed at os install

I have not tried wireshark but neither of the three servers im testing against show any connection attempt at all from my machine

2 of the servers im testing against are remote and the other is local
all three are running server 2k3 + sql 2k5 and will all respond to either ip or fqdn

all of the other three machines im my house will connect (1 on server 2k3, 1 on xp and one on win 7)

its as though my machine simply will not allow a connection to an sql server regardless of what application i use
1) try running the query with temporarily disabled AVG
   - I am not very much into AVG, but AV suites do feature blocking of connections for security reasons. Are there any log files of AVG showing something? (McAfee calls that Access Protection, and features a log file for this)
2) let Wireshark sniff your local interface when trying to connect.
  - see if a connection to IP and port to one of the distant servers are initiated, and - more important, if there is coming any answer back from remote server (SYN -> SYN/ACK -> ACK at TCP level)
3) Is Defender running on top? -> disable it. Windows 7 is doing a lot of things without asking you properly.
4) When did you do the last full AV scan on your PC with most current AV signatures? - If PC starts behaving strangely, it could well be a virus.
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

ChrissalterAuthor Commented:
Ive tried disabling AVG as much as it will allow, but its only the free antivirus so i feel fairly confident that its not a issue, although i will return to it once all other options are exhausted

Windows defender is not turned on, or thats what it tells me when i attempt to start the program

Just downloaded wireshark so will give that a shot
ChrissalterAuthor Commented:
Ok ive tried wireshark, i'll be honest, it doesnt really mean mch to me, but the there are what appear to be responses from the server

but still no connect....
What is the message that you are receiving ?
Since AVG is garbage I suggest you uninstall it completely
and then give it a try.
You can always reinstall it later if you like Czech software....

ChrissalterAuthor Commented:
Ok AVG is gone, all frameworks removed/reinstalled..... still nothing

im not receiving any error message

tried this code in a vb app

Dim con as new SqlConnection("my connection string with 5 second timeout")

The code simply hangs a line 2 and will sit there with no error message until i stop the debugger

Going to try opening a connection using odbc to eliminate any sql native issues

also tried opening the port using vb using a simple .net.tcpclient which WAS succesful, so i guess that excludes any form of port blocking on 1433

from tracing back through my event log i can see that the only change that happened around the time is that i changed the main address pool that my dhcp server assigns, the dhcp server is on my local server
and used to assign - 50 but now assigns - 160
this was done do avoid conflicts when activating the vpn to my workplace, but spends most of its time disconnected

the ip on my affected computer is and always has been assigned via dhcp, can the fact that it now receives a different assignment cause this issue? that question alone makes me feel like im scraping the bottom of the barrel, but i have to ask it
still fishing in the blue...

What if you just try to manually and temporarily assign the IP you used to have earlier, and then retry the test?

Can you maybe post the wireshark .pcap file, filtered by the 2 IPs of your local machine and teh sql server you tried? - Please note that there may be password information in the filtered file, showing your sql password.
ChrissalterAuthor Commented:
I did try reassigning the original ip with no avail

Got sick of it, reformatted and reinstalled....guess what!! the problem still exists

but in my haste i stupidly installed office 2010 an visual studio before sql management studio
(mixture of getting rushed around by the missus for a visit to the mother in laws)

but i am actually able to generate an error now.

when creating a dsn i have 2 sql options for the datasource "sql server" and "sql native client"

if i use "sql server" i get the following

Microsoft SQL Server ODBC Driver Version 06.01.7600

Running connectivity tests...

Attempting connection
[Microsoft][ODBC SQL Server Driver][DBNETLIB]Invalid connection.


the only thing i have left is office 2010, currently installing it on one of the kids computer to see if sql access suddenly stops working

lets see if our buddies at microsoft have managed to create yet another internal software conflict.....

if this doesnt work then i'm all out of ideas......

ChrissalterAuthor Commented:
Ok office installed on the kids pc and still connecting fine, although the kids pc is on xp i dont want to think it could make a difference, could it?

also tried updating the sql native client on my pc and have also installed the sql 2008 native client but still nothing, please can anybody shed any light on this

really dont know what to try now,
i suppose the only thing left in order to eliminate everything is to install vs2005 + office 2010 on the other win7 pc, i really didnt want to as its primarily used as a media centre but i think i'm going to have to

its the lack of any error messages that really bites me, the issue seems to be purely isolated to this pc, if i was only testing against one sql server i'd be looking at the server, but 3... its got to be my pc
ChrissalterAuthor Commented:
Minor Update

Installed all windows updates, sql updates, office updates, made slight but very confusing progress

when creating a sql native client dsn i do the following

1. Select "Sql Native Client" from the list of data sources
2. Set the name as "Test"
3. The dropdown will now find my local sql server in a named pipe format
4. hit finish to call the test window, my windows logon will authenticate as my home network has AD
5. then following is shown before hitting test

Microsoft SQL Native Client Version 09.00.2047

Data Source Name: Test
Data Source Description:
Use Integrated Security: Yes
Database: (Default)
Language: (Default)
Data Encryption: No
Trust Server Certificate: No
Multiple Active Result Sets(MARS): No
Translate Character Data: Yes
Log Long Running Queries: No
Log Driver Statistics: No
Use Regional Settings: No
Use ANSI Quoted Identifiers: Yes
Use ANSI Null, Paddings and Warnings: Yes

6. then i hit test and then thats where it hangs, no error message and no failure
As I assume that you are still on Windows 7, two more guesses:

- did you switch off "UAC" (should be off for such tests)?
- The network you are now connected to: what type is it as of "Network and Sharing center"? Is it eitehr "Home" or "Work Network"?
ChrissalterAuthor Commented:
Have solved it

Installed sql server 2005 service pack 3, it was installed before but something must have changed the "Sql Native Client" driver

The version berfore the format was 9.0.....

its now 2005.90.4035.00

unfortunately i only took a reg dump and did not export the event log before the format so i cant trace what or when it was changed

but i am going to look at virtual server 2005 install log as it seems to have the ability to log to sql and was installed vaugely around the time the issue surfaced

I hope my journey helps somebody else having the same or similar issue, dont we just love version mismatches.......
ChrissalterAuthor Commented:
ps i will award points to all that contributed

Thanks Guys
ChrissalterAuthor Commented:
Just want to thank you for the help
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows 7

From novice to tech pro — start learning today.