Solved

How to access sql server 2005 databse from client PC?

Posted on 2009-05-20
2
210 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
2 Comments
 
LVL 2

Accepted Solution

by:
krishrr earned 500 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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

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

Suggested Solutions

I've encountered valid database schemas that do not have a primary key.  For example, I use LogParser from Microsoft to push IIS logs into a SQL database table for processing and analysis.  However, occasionally due to user error or a scheduled task…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

920 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now