Can't connect to MSSQLSERVER

mattlaltman
mattlaltman used Ask the Experts™
on
I just installed SQL server 2008 on a new desktop computer.  I created the default instance of MSSQLSERVER and I cannot connect to it with management studios.

Here is the error I get:
Cannot connect to .\MSSQLSERVER.
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 25 - Connection string is not valid) (Microsoft SQL Server, Error: 87)


I have tried many things and verified the following:
MSSQLSERVER is currently running
The TCP and Named pipes have been enabled
Port 1433 is open on the windows firewall
username and password is correct
Named instance it correct .\MSSQLSERVER

I can't think of anything else to check.  I've done this before on my home computer and it worked.  Now I'm trying it on a new work computer.  This computer is on a network, could that have something to do with it?  Maybe there is another firewall... I'm stumped
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Author

Commented:
I just found another firewall program on this desktop (McAfee).  I'll need to figure out how to open port 1433 on this too.  I'm working on it now.
Rich WeisslerProfessional Troublemaker^h^h^h^h^hshooter

Commented:
You installed the default instance?
Try connecting to either "./" or to "servername" without any slashes?

Author

Commented:
Ok I'm pretty sure this is my issue because when I look at the firewall log it says that it's been blocking items at the same time I make the request to connect.  It says "Blocked UDP".  I thought this was TCP (I don't know the difference).  

Can anyone help me out with the settings?  I included a screen capture for adding a new rule.

HIP.JPG
HTML5 and CSS3 Fundamentals

Build a website from the ground up by first learning the fundamentals of HTML5 and CSS3, the two popular programming languages used to present content online. HTML deals with fonts, colors, graphics, and hyperlinks, while CSS describes how HTML elements are to be displayed.

Author

Commented:
ok I tried connecting to "./" and it worked..... but is this different from connecting to ./MSSQLSERVER?
Rich WeisslerProfessional Troublemaker^h^h^h^h^hshooter

Commented:
Confirm the firewall software is up to date: https://kc.mcafee.com/corporate/index?page=content&id=KB65845
You should be able to select the Application at that point.

And yes, it should be tcp/1433.  For server management, you may also need udp/1434... but I'd severely limit the range of addresses I let in on udp/1434....
Rich WeisslerProfessional Troublemaker^h^h^h^h^hshooter

Commented:
I read ./MSSQLSERVER as attempting to connect to a named instance with the name MSSQLSERVER on the local system.
I think just "." is an even faster way to get to the default instance on the local server.

Author

Commented:
I have mcAfee HIP version 7.0.0 build 1159 version 3400.  

I created rules for both TCP/1433 and UDP/1434 but it's still not working...  the firewall activity log says:
Blocked Incoming UDP - Source: "IP address" (1900) Destination: "different IP address" (1900)

what is 1900?  
Rich WeisslerProfessional Troublemaker^h^h^h^h^hshooter

Commented:
*confused*  What's not working?  You can't connect using "./MSSQLSERVER"?  But "./" does?  I can't connect to a default instance of "./MSSQLSERVER" either on SQL 2008, and I don't have ANY firewall on the box.  
I'd suggest just using the computername to connect, or ".", or "./"

Author

Commented:
I'm not sure I understand your last comment.  

Yes, the named instance is called MSSQLSERVER

I cannot connect to .\MSSQLSERVER
but I can connect to .\

I'm assuming these are different but I don;t know.
Rich WeisslerProfessional Troublemaker^h^h^h^h^hshooter

Commented:
I though you indicated you created a default instance?
That is not the same as creating a named instance with the name MSSQLSERVER.

Author

Commented:
ok, I'm truly sorry for my ignorance in this haha.  

I created an instance but I used the default naming convention of MSSQLSERVER.  

Here is a screen capture if this helps.


server.JPG

Author

Commented:
I'm trying to provide as much information as I can.  So here are my firewall rules as well:

I added 1900 and 2391 because I saw that it was blocking it in the log when I would try to access MSSQLSERVER.


firewall.JPG
Rich WeisslerProfessional Troublemaker^h^h^h^h^hshooter

Commented:
What you saw may have been a block on the return UDP traffic... open command prompt, and run "netstat -aon", and look to see if there is anything which indicates that it's listening on UDP 1900 or UDP 2391... if there isn't, you should be able to safely remove those two entries.

Author

Commented:
nope, it wasn't listening to 1900 or 2391 so I'll remove those rules.

Can you think of anything else I should check to help make this work?
Rich WeisslerProfessional Troublemaker^h^h^h^h^hshooter

Commented:
But to confirm, connecting to "./" worked. (?)

Go ahead and connect, and execute the query "select @@servername".

Whatever value that select returns -- use that value to connect from now on.

Author

Commented:
yes, I can connect to "./" and when I execute the query "select @@servername" it returns my computer name (not MSSQLSERVER).

Author

Commented:
should I just delete the instance and try reinstalling?  I've been working on this for 2 days now and can't figure it out.

Maybe I'll try installing a new named instance first, call it something different and see if I can connect to it.

Author

Commented:
Not sure if this will help but here is a screen shot of my installed instances.  

This is the sceen that shows when you go to install a new instance or update a current instance.
server-instances.JPG

Author

Commented:
By the way, I can connect to .\SQLEXPRESS with no issues.

Still can't connect to .\MSSQLSERVER

Author

Commented:
ok I just created a new named instance and I can connect to this one.  I'll just use this new instance instead of MSSQLSERVER..

I'm still stumbed on why I can't connect to MSSQLSERVER though.  oh well.
Professional Troublemaker^h^h^h^h^hshooter
Commented:
You couldn't connect to MSSQLSERVER because that wasn't the instance name.  That old instance didn't have an instance -- it was the default instance.

Author

Commented:
thank you for all your help.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial