?
Solved

How to access sql server 2005 databse from client PC?

Posted on 2009-05-20
2
Medium Priority
?
220 Views
Last Modified: 2012-08-13
PC1 : I have SQL server 2005 database , Win XP, IP = 192.168.0.2
PC2 : windows 2000, IP = 192.168.0.59

PC1 and PC2 are connected to each other.
Enabled SQL server 2005 database for remote connection with protocol TCP/IP and Named pipe both.

Now I want to access/use the SQL server 2005 database from PC2.

my connection string is
"ConnectString=Server=192.168.0.2;UID=test;PWD=test123;Database=HOTKEYDB"

But when I try to connect to the database it gives the error as below

"An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)"

How do I solve this problem?

Thanks in advance.
0
Comment
Question by:madhav_ghatole
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Accepted Solution

by:
krishrr earned 1500 total points
ID: 24429211
Try the following:

1. Enable remote connection with protocol TCP/IP and Named pipe both for both PC1 and PC2.

2. Make sure the double quotes  are properly placed as below:
ConnectString="Server=192.168.0.2;UID=test;PWD=test123;Database=HOTKEYDB"

3. Try to connect the database from PC2 with SQL Server Management Studio. If it connects properly then try to connect with code.

4. Try to connect with Server name instead of IP.



0
 

Author Closing Comment

by:madhav_ghatole
ID: 31583382
Thanks
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently, when I was asked to create a new SQL 2005 cluster, Microsoft released a new service pack for MS SQL 2005 what is Service Pack 3. When I finished the installation of MS SQL 2005 I found myself troubled why the installation of SP3 failed …
INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question