Click to See Complete Forum and Search --> : MS SQL 2000, remote connection


Andrzej
November 23rd, 2008, 12:37 PM
Hello

I try to play with Microsoft SQL 2000 ( 8.0 ).
I'm able to connect when I run my application where the MS SQL 2000 is installed.
Could you please help me to build ConnectionString to make remote connection.

I do it as folows ( ... but I catch error "{SQL Server does not exist or access denied.} " )



SqlConnection myCon = new SqlConnection();
myCon.ConnectionString = "Data Source=192.36.66.139,1433;Network Library=DBMSSOCN;Initial Catalog=" + dbname + ";User ID=sa;Password="


btw, I found some helpful info about conn.str on the web, but it doesn't work for ms sql 2000.
http://www.connectionstrings.com/?carrier=sqlserver

here is configuration of my MS SQL Server 2000

dglienna
November 23rd, 2008, 02:48 PM
This looks wrong:

"Data Source=192.36.66.139,1433;

Should probably be this:


"Data Source=192.36.66.139:1433;

Andrzej
November 24th, 2008, 03:06 AM
thanks for replay,


Data Source = 192.36.66.139:1433


it throw new error "Specified SQL Server 192.36.66.139:1433 not found"

dee-u
November 24th, 2008, 07:18 AM
You may want to have a look at this (http://www.teratrax.com/articles/sql_server_access_denied.html). And have you applied all the service packs?

Andrzej
December 2nd, 2008, 12:56 PM
thanks for help.

I found the solution.

The problem wasn't in my ConnectionString but there was a bug in MS SQL 2000 SP3.



1. I downloaded the last SP ( MS SQL 2000 SP4 , http://www.microsoft.com/downloads/details.aspx?familyid=8E2DFC8D-C20E-4446-99A9-B7F0213F8BC5&displaylang=en

2. install as follows:

setup SAPWD="password" SECURITYMODE=SQL DISABLENETWORKPROTOCOLS=0

3. go to FIREWALL settings ->Exceptions->Add New Port:
app_name
port_number (default is 1433)

4.
modify connectionString

Sqlconnection tcpConn;
// example
tcpConn = "Data Source=192.168.1.101,1433;Network Library=DBMSSOCN;Initial Catalog=" + db_name + ";User ID=sa;Password=";
// ...


it works perfect.

dee-u
December 2nd, 2008, 01:16 PM
That's why I asked in my previous post if you have applied all service packs since similar cases existed wherein applying SP4 just solved their problems. Glad it worked for you also.