Reputation: 136
I have 2 SQL Server instances on my machine, one 2000 and one 2008.
The SQL Server 2000 instance is called MSSQLServer
and the SQL Server 2008 instance is called MSSQLServer2008
.
Now I want to connect to MSSQLServer
(version 2000) with ASP.Net and I'm using this connection string:
<connectionStrings>
<add name="myConnectionString"
connectionString="Data Source=MyServerIP,1433;Initial Catalog=MyDBName;uid=MyUsername;pwd=MyPasword;Trusted_Connection=False;"
providerName="System.Data.SqlClient" />
</connectionStrings>
and when I want to connect to the database I get this error :
No connection could be made because the target machine actively refused it
I used MyServerIP\Instancename,1433;
but I get error again.
What should I do? Thanks in advance.
Upvotes: 0
Views: 44
Reputation: 366
Check for Firewall Settings,Port allocation and TCP/IP Connection settings. One of all these should be a culprit.
Upvotes: 0
Reputation: 13
You can set different ports for each instance. See https://support.microsoft.com/en-us/kb/823938 for details.
Also, make sure you have enabled TCP/IP connections for these instances. The KB provides the details as well.
Upvotes: 1