when i was working in windows 2000 (2000 Advanced Server,windows XP,9x
i wrote program which used DB (Microsoft SQL Server 2000) but yestarda
i was installed Windows 2003 Server my program is not working ........
it's throws Exception ........ :
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Erro
establishing socket.
at com.microsoft.jdbc.base.BaseExceptions.createException(Unknow
Source)
here is my connection's source code
Code:
public Connection GetXAConnection(String _ServarName,Strin
_DataBaseName,int _Port,String _UID,String _Pssword) throws Exception
{
try
{
SQLServerDataSource ds = new SQLServerDataSource();
ds.setDataSourceName("SQLServer");
ds.setServerName(_ServarName);
ds.setDatabaseName(_DataBaseName);
ds.setPortNumber(_Port);
ds.setSelectMethod("cursor");
return ds.getConnection(_UID, _Pssword);
}
catch (SQLException ex)
{
ex.printStackTrace();
throw ex;
}
}
i don't know english very well and please sorry about it .......
please help me ............................
-
grdzeli_kac
-----------------------------------------------------------------------
Daniel Hagen - 09 Jul 2004 10:40 GMT
> when i was working in windows 2000 (2000 Advanced Server,windows XP,9x)
> i wrote program which used DB (Microsoft SQL Server 2000) but yestarday
[quoted text clipped - 6 lines]
> at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown
> Source)
Use netstat on the server to determine wether anyone is listening on the
SQL Server TCP port (usually 1433).
You propably did not install SQL Server Service Pack 3.
On Windows 2003 Server TCP/IP is disabled for SQL Server without SP 3
due to security issues. Look at the eventlog, you will propably find a
message stating something in that direction.
Install SQL Server Service Pack 3 on the server, reboot and you should
be fine.
Daniel Hagen