I don't believe I have express. I don't see Express anywhere, also in the config manager I don't see a section for sql express. TCP/IP is enabled though. Windows firewall is off.
Main Topics
Browse All TopicsHello Experts:
I'm having trouble using one of my everyday .net programs to connect to our new sql08 server. I have a sql2k and a sql2k5 server that never give me grief with this program. Whenever I try to connect to one of the databases I get the 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)
I've tried it using my normal connectionstring that works in 2k and 2k5. I tried it with the IP of the sql server, then I tried using the named instance of the server or what I THINK is the named instance...
I've tried odd combos of "myserver\instance" and all the rest. I tried using the standard connectionstrings from: http://www.connectionstrin
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
well Jay-are, now it is confirmed that you are not using express but standard so there might be quite a few reason which can show you this error, my friend and SQL Server MVP has recently written one article which covers almost all possibility of this error. have a look.
http://blog.sqlauthority.c
Ritesh Shah
www.SQLHub.com
Ok I completed all the steps in that article. I didn't have an alias to begin with but I added one anyway. Not sure about that last step.
I rebooted after doing everything just to make certain. I still get the same error. I think that perhaps my connection string is just wrong. This is the first sql server I've had that had a named instance...Typically I just connect to my other servers using the IP for the server name. So I'm not certain I'm using the right string. Here is the original:
Dim ConnectionString As String = "workstation id=""me"";packet size=4096;user id=user1;password=password
and the one I tried from the site listed above:
Dim ConnectionString As String = "Server=DA-SQL03\SQL03;Dat
The server name inside the console shows: DA-SQL03\SQL03
The user is setup is called user1. I've tried different variations of the server name and none seem to get me past that error. Any other ideas?
I really think it is a problem with the connection string I'm using. I changed to this:
Dim ConnectionString As String = "Server=""DA-SQL03\Sql03""
and now I get the following error:
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
Exception Details: System.Data.SqlClient.SqlE
Throws this exception when I try to open the connection in my vb.net program.
When you use Truseted Connection=True, the UserI d and Password are ignored and the system attempts to log you in as the Current ActiveDir user. If this is a scheduled job, then it will use the ActiveDir user the job runs under,
Based on your errors, it sounds like the SQL server was installed in "Windows Authentication" mode only and NOT in "SQL Server and Windows Authentication" mode. Therefore you'll have to use Trusted Connection=True.
3 qusetions:
1. Is the PC you're running the VB code in the same domain as the SQL server?
2. Can you access the SQL server with your activedir logon from SQL Server management console on your PC?
3. if so, are you running the VB code with same login?
Ah ok, I thought I was onto something with that Trusted Connection.
When I run the code from the actual server or my remote devbox I get the same error. The server isn't part of a domain and isn't using Active Directory unless WS2k8 installs this by default, I certainly didn't choose it. I assume my vb.net programs run using the asp.net user?
Try and get the SQL serve switched to: "SQL Server and Windows Authentication" mode.
This can be done by right-clicking the server name within the SQL management console, then select the security tab, and change the option from "windows authentication" to "SQL Server and Windows Authentication". This is how your other servers are probably configured anyway.
Once this is done and there is a valud SQL logon for you to use, you're 1st connection string at the begining of this thread should work fine.
I changed my code back to my original connection string using the proper named instance.
When I use an incorrect username or pass I get an error right away when I try to open the connection. When I use a good username/pass I get an error only when I try to fill a dataset with data from one of the databases. That's when I get this named pipes error. Does this mean its specifically a problem with the user setup on sql08?
I'm not sure if I'm setting the proper rights or not. Sql08 already had an "sa" user setup. When I try to check off the new databases for user SA in user mapping it gives me an error: "Cannot use the special principal 'sa'."
I've tried lots of different user setups and they all produce the same Named Pipes error listed above...I'm sort of stuck here since I can't even get in the front door!
Interesting. I added the datasource control to my webform and setup a connection string. When tested in the wizard it works just fine, exactly like I have it on my code-behind. However when I click "OK" to finish it says: This server version is not supported. You must have Microsoft SQL Server 2005 Beta 2 or later.
??
When I copy/paste the connectionstring it created I get this error: Exception Details: System.Data.SqlClient.SqlE
Source Error:
Line 87: Dim newcommand As New SqlCommand(query, conn)
Line 88: newcommand.Connection = conn
Line 89: conn.Open()
Line 90: SqlDataAdapter1.SelectComm
Line 91: SqlDataAdapter1.SelectComm
Source File: C:\inetpub\wwwroot\login\W
Almost like I have the wrong credentials again but I don't.
can you try using following connection string?
"data source=DA-SQL03;initial catalog= Customers;password=passwor
if above string gives you an error about user1 permission, go to your SSMS of sql server, create new login, user and use that ID/PASS in above connectionstring.
use master
CREATE LOGIN [TempUser1] WITH PASSWORD=N'password' , DEFAULT_DATABASE=[Customer
go
use Customers
CREATE User[TempUser1] FOR LOGIN [TempUser1]
go
your connection new string would be
"data source=DA-SQL03;initial catalog= Customers;password=passwor
I've tried enabling/disabling the different protocols. I updated the server to sql 2008 SP1. I tried different web.config's for my application. I'm not sure what the problem is. I can connect to the server, it opens the connection. I just can't fill a dataset without getting that named pipes error...
I opened a new question in hopes of getting more responses.
http://www.experts-exchang
Business Accounts
Answer for Membership
by: mfreudenPosted on 2009-05-22 at 13:12:41ID: 24454710
What version of SQL 08 are you using?
xpress/arc hive/2005/ 05/05/ 4150 84.aspx
If it's 2008 express, you need to allow for remote access:
http://blogs.msdn.com/sqle