janavar
asked on
sql server problem
hi,
i have a very strange problem. i can connect to sql server 2000 which run on my local with server name like this;
sqlConn.ConnectionString = "server=mySrv;database=msp ;user id=sa;password=janavar;";
but i can not connect with this;
sqlConn.ConnectionString = "server=127.0.0.1,1433;dat abase=msp; user id=sa;password=janavar;";
i need this because i must use ip address.
thanks in advance...
i have a very strange problem. i can connect to sql server 2000 which run on my local with server name like this;
sqlConn.ConnectionString = "server=mySrv;database=msp
but i can not connect with this;
sqlConn.ConnectionString = "server=127.0.0.1,1433;dat
i need this because i must use ip address.
thanks in advance...
From
http://www.connectionstrings.com/?carrier=sqlserver
Connect via an IP address
Provider=sqloledb;Data Source=190.190.200.100,143 3;Network Library=DBMSSOCN;Initial Catalog=myDataBase;User ID=myUsername;Password=myP assword;
DBMSSOCN=TCP/IP. This is how to use TCP/IP instead of Named Pipes. At the end of the Data Source is the port to use. 1433 is the default port for SQL Server.
http://www.connectionstrings.com/?carrier=sqlserver
Connect via an IP address
Provider=sqloledb;Data Source=190.190.200.100,143
DBMSSOCN=TCP/IP. This is how to use TCP/IP instead of Named Pipes. At the end of the Data Source is the port to use. 1433 is the default port for SQL Server.
ASKER
to angelIII;
i am getting this exception with your solution;
System.ArgumentException: Keyword not supported: 'port'.
to ptjcb:
i am getting this exception with your solution which is
Provider=sqloledb;Data Source=127.0.0.1,1433;Netw ork Library=DBMSSOCN;Initial Catalog=msp;User ID=sa;Password=janavar;
{"[DBNETLIB][ConnectionOpe n (Connect()).]SQL Server does not exist or access denied."}
i am getting this exception with your solution;
System.ArgumentException: Keyword not supported: 'port'.
to ptjcb:
i am getting this exception with your solution which is
Provider=sqloledb;Data Source=127.0.0.1,1433;Netw
{"[DBNETLIB][ConnectionOpe
Run the svrnetcn.exe on that computer. It will show you the SQL Server Network Utility. Make sure that tcp/ip is enabled and the port is 1433.
ASKER
there are Named pipes and tcp/ip in the enabled protocols list. and tcp/ip properies page 1433 is set as default port.
What is the operating system? Is that the only SQL Server instance on the local computer?
ASKER
os: xp pro service pack 2
in the "sql server service manager" window there are mySrv and mySrv\SQLEXPRESS in combobox as server. but how can i sure how many sql server instance running on the local?
in the "sql server service manager" window there are mySrv and mySrv\SQLEXPRESS in combobox as server. but how can i sure how many sql server instance running on the local?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
yes when i look from control panel i see sql server 2000 and 2005. and i removed 2005. now there sql server 2000 and sql server 2005 mobile [enu] developer tools. but still i cant connect, i am getting the same error.
by the way i tested these strings for another remote sql server (2005), both work fine.
Provider=sqloledb;Data Source=x.x.x.x,1433;Networ k Library=DBMSSOCN;Initial Catalog=msp;User ID=sa;Password=123;
server=x.x.x.x,1433;databa se=msp;use r id=sa;password=123;
and another strange case is when i try to telnet 1433 port, i cant connect; which port it is listening i am confused :(
C:\>telnet 127.0.0.1 1433
Connecting To 127.0.0.1...Could not open connection to the host, on port 1433: Connect failed
by the way i tested these strings for another remote sql server (2005), both work fine.
Provider=sqloledb;Data Source=x.x.x.x,1433;Networ
server=x.x.x.x,1433;databa
and another strange case is when i try to telnet 1433 port, i cant connect; which port it is listening i am confused :(
C:\>telnet 127.0.0.1 1433
Connecting To 127.0.0.1...Could not open connection to the host, on port 1433: Connect failed
sqlConn.ConnectionString = "server=127.0.0.1;port=143