I installed SQL Server 2005 Express on one of my development machine, I had
since then having problem connecting to a SQL Server 2000 (On a cluster)
database. The problem persist even after I remove SQL Sever 2005 Express.
The following is the error message:
SAC.EDS.CorpAction.WithholdingTax.UnitTesting.WithholdingTaxOverrideRecordCr
eate :
System.Data.SqlClient.SqlException :
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: SQL Network Interfaces, error: 26 - Error Locating
Server/Instance Specified)
I do not experience the same problem when connecting from a machine without
SQL Sever 2005 Express installed. I don't know why ADO.NET 2.0 thinks I am
trying to connect to a SQL Server 2005 database.
Please advice!
Thanks,
John Yung
"John Yung" <jo...@sac.com> wrote in message
news:OtwVPId9...@TK2MSFTNGP14.phx.gbl...
The SQL Server 2000 is not on the development machine. According to our DBA,
SQL Server 2000 is running SP4. Further more, it is not a cluster (my
mistake), but an instance of SQL Server running on a single database
machine.
Thanks,
John Yung
"Rick Byham [MS]" <ric...@online.microsoft.com> wrote in message
news:egE7pfd...@TK2MSFTNGP11.phx.gbl...
"John Yung" <jo...@sac.com> wrote in message
news:uqVO%23yd9F...@TK2MSFTNGP14.phx.gbl...
I tried all your suggestions, but they don't work; for example: I use this
as connection string:
Data Source=QA1SQL02, 1500;Initial Catalog=saccorpaction;User
Id=sacweb;Password=websac1
note: QA1SQL02 is the database server name,
I got this error message:
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.)
I am able to confirm that the problem is cause by ADO.NET 2.0, and not SQL
Server 2005 Express. I tried the software on a fresh machine with .NET 2.0
installed, i received the same error messages.
I don't understand why ADO.NET thinks I am trying to connect to SQL Server
2005 (unless the error message is hard-coded to 2005).
Please advice, thanks,
John Yung
"Rick Byham [MS]" <ric...@online.microsoft.com> wrote in message
news:e5P2gep9...@TK2MSFTNGP10.phx.gbl...
I compile (VS.NET 2003) the same code in .NET 1.1 and it works:
This is the connection string I used:
Data Source=QA1SQL02\DEVSQL03;Initial Catalog=saccorpaction;User
Id=abc;Password=abc
I am very sure that the problem is from ADO.NET 2.0.
Thanks,
John Yung
"John Yung" <jo...@sac.com> wrote in message
news:Og6t59q%23FH...@tk2msftngp13.phx.gbl...
"John Yung" <jo...@sac.com> wrote in message
news:uGpS7br%23FHA...@TK2MSFTNGP09.phx.gbl...
Do you know anyone from the ADO.NET group that could help me with this?
Thanks,
John Yung
"Rick Byham [MS]" <ric...@online.microsoft.com> wrote in message
news:eqzdB30%23FHA...@TK2MSFTNGP11.phx.gbl...
Thanks,
Randy
It's likely that the computer where SQL Server is running has Windows
Firewall enabled, and that the SQL Server TCP port (1433 by default,
variable if using a named instance such as SQLExpress) is blocked. It's also
likely that 1.1 is working because it's using named pipes instead of TCP,
which gets through the same channel as file-sharing which is typically open.
If this is the case in your scenario, you can do one of these:
a) force named pipes. you can do this by adding "np:" before the server
name. In your connection string it would be "Data Source=np:QA1SQL02"
b) open the SQL Server port in the firewall of the computer where SQL Server
is running
Regarding your question about SQL 2000 vs 2005, note that ADO.NET is not
confused, it's the error message that isn't clear; we meant that if this
*were* SQL Server 2005, then you may want to check out the connection
setting.
--
Pablo Castro
Program Manager - ADO.NET Team
Microsoft Corp.
This posting is provided "AS IS" with no warranties, and confers no rights.
"ran...@newsgroups.nospam"
<randyhnewsg...@discussions.microsoft.com> wrote in message
news:6B79EE56-D70C-4AF0...@microsoft.com...