Solved

No connection could be made because the target machine actively refused it

Posted on 2007-11-18
5
42,672 Views
Last Modified: 2012-08-14
I have a SQL Server 2005 Express installed on my Intranet server that resides in my DMZ.

I have access from my LAN to my DMZ open.

I have the SQL Server configured to allow remote connections to the server.

When I attempt to access the Database services from my "Microsot SQL Server Management Studio" I get the following error:

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: TCP Provider, error: 0 - No connection could be made because
the target machine actively refused it.) (Microsoft SQL Server, Error: 10061)


When I attempt to establisg a connection through ODBC. I get the following error:

Connection failed:
SQLState: '01000'
SQL Server Error: 10061
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]ConnectionOpen (Connect()).
Connection failed:
SQLState: '08001'
SQL Server Error: 17
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]SQL Server does not exist or access denied.

Could an expert please give me some clues at what may be wrong.

Regards

Jim

0
Comment
Question by:jsulliva1957
5 Comments
 
LVL 25

Expert Comment

by:imitchie
ID: 20310639
you need to allow on remote connections on the SS2005Express installation
0
 
LVL 25

Accepted Solution

by:
imitchie earned 500 total points
ID: 20310648
From Start->Programs,Microsoft Sql Server 2005, Configuration Tools, SQL Server Surface Area Configuration
near the bottom, click on Surface Area Configuration for Services and Connections
on the tree at the top left, expand to SQLExpress, Database Engine, Remote Connections.
on the right, click on Local and remote connections, Using both TCP/IP and named pipes.
Apply and click OK.
close all windows opened
0
 
LVL 18

Expert Comment

by:Yveau
ID: 20311341
imitchie is right.
... and don't forget to restart the SQL service !

Hope this helps ...
0
 

Author Closing Comment

by:jsulliva1957
ID: 31409890
Thanks imitchie,

This is EXACTLY the solution.

Regards

Jim
0
 
LVL 6

Expert Comment

by:Jerryuk007
ID: 20563577
imitchie solutions are the most likely cause of the problem...

Also if that doesn't work, please check this:
Is your SQL Server in the same Network Domain as your Client ?
-- If not check the Domain Trust...

Check your user name and password you're using to open your connection.

Also I had a similar problem using OLEDB Connection though a VC++ box to connect to a SQL Server when that application run on Citrix (it worked fine on a normal networked workstation !)... The way arund was to use an ODBC Connection (DSN) but I suspect the problem might have been with an old DLL on the Citrix Server.

Check that the SQL Server accept the type of connection you're trying to use (TCP/IP for both is generally better than Named Pipes especially with "Trusted Auth")...

Hope this helps !

Jerry
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
T-SQL: Do I need CLUSTERED here? 13 48
SQL Function NOT ROUND 9 11
Present Absent from working date rage 11 22
Weighted Randomizing 6 17
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

825 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