Avatar of Marsh-Narewec
Marsh-Narewec
 asked on

Cannot connect to MS SQL Server 2008 R2 on Win2008 Server R2 using MS SQLMS

Dear all
From my laptop I am unable to connect to the network SQL server  ( MS SQL 2008 R2, Win2008 R2 Server) using MS SQL Mgt Studio. It gives me following error.

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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)

However I am able to access my web application on the server which accesses the database on that server.

Please assist.
Microsoft DevelopmentMicrosoft SQL Server.NET Programming

Avatar of undefined
Last Comment
Jaime Olivares

8/22/2022 - Mon
bbao

did you ever access the SQL database from your laptop on the same network?
Naman Goel

Is your laptop is in same domain as your DataBase.
ASKER CERTIFIED SOLUTION
Jaime Olivares

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Marsh-Narewec

ASKER
(1) I never directly via MS SSMS access the SQL Server database using my laptop. However using my laptop I can access the web application installed on the same server as its database.

(2) My laptop is in the same domain as the Database Server

(3) I tried accessing using IP address instead of server name but that too did results in the same error.

My laptop is Win 7 professional edition. I am trying to connect to a MS SQL 2008 R2 database install on a win 2008 r2 server using MS SQL Server Management Studio.
Your help has saved me hundreds of hours of internet surfing.
fblack61
Marsh-Narewec

ASKER
Guys resolved the issues myself :)

Windows 2008 R2 -- > Administrative tools - Windows Firewall with Advance Security --> Windows Firewall Properties --> Firewall State --> Inbound Connections  --> "Allow"
Marsh-Narewec

ASKER
I've requested that this question be closed as follows:

Accepted answer: 0 points for Marsh-Narewec's comment #a38453472

for the following reason:

Found the solution myself
bbao

i think jaime_olivares already posted the corresponding solution in comment 38453412.

Try to configure your server to accept TCP/IP connections (launch your SQL configuration tool). Then try to access the server using the IP address instead of a name, if it succeeds, try to do it by machine name.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Jaime Olivares

This resembles me a police series. I think the suggestion of trying TCP-IP led you to an "inevitable discovery" of the solution.
Jaime Olivares

sorry, I didn't press the "Object" button. Please read my previous comment.
Marsh-Narewec

ASKER
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
Marsh-Narewec

ASKER
Nope it never did.

I copy paste the error message on Google search and the URL link I provided above led me to solving the issues.

The expert comment talks about "configuration manager" nothing was mentioned above "firewalls".
Marsh-Narewec

ASKER
Just letting you Admin and others you may later come upon this thread that that's not a solution. Admin forced to accept which I don't have control.

To resolve this similar issue that I posted please read this blog:

http://blog.sqlauthority.com/2009/05/21/sql-server-fix-error-provider-named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server-microsoft-sql-server-error/

I am newbie to EE and I think the Admin is VERY unfair.
Jaime Olivares

Hi Marsh,
I am not an admin or moderator, but I am a very old contributor here at EE, so let's me explain you the dynamic from my point of view:
When any member sends a question which is not precise or detailed, we usually shoot a possible answer and wait some feedback to continue moving towards the solution.
In your case, the 3 of us shot the first answer and were waiting for your feedback, that arrived soon after 30 minutes. 10 minutes later, and before we could continue guiding you to the solution, you posted your own answer.
I am pretty sure I would arrive to the same conclusion by suggesting:
- To ping your server IP
- To verify the IP Port used by the SQL server
- And finally, to review your server's firewall options
- etc.
Even in the case you used another site to find the solution, it is customary here at EE to award points to the people who tried to help you (at least partially). You could score a B or even a C, also you could award some points to the other experts that certainly could also post the final solution. As you did nothing of them, the admins decided to force accept.
Hope this helps,
Jaime.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Marsh-Narewec

ASKER
Hi Jamie, thank you this information. It really helps me understand EE. As I mentioned earlier I am new to EE and starting to learn the ropes here.

Please accept my apologies.

Marsh.
Jaime Olivares

No worries, and happy exchange!