Solved

How to access sql server 2005 databse from client PC?

Posted on 2009-05-20
2
212 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

There are some very powerful Data Management Views (DMV's) introduced with SQL 2005. The two in particular that we are going to discuss are sys.dm_db_index_usage_stats and sys.dm_db_index_operational_stats.   Recently, I was involved in a discu…
by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

772 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