DZone Forums
Go Back   DZone Forums > Community > Tools & IDEs > Eclipse
Reload this Page Problem connecting to MSSQL database in Eclipse
Notices
Reply
 
LinkBack Thread Tools Display Modes
  (#1 (permalink)) Old
Member
 
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jan 2009
Unhappy Problem connecting to MSSQL database in Eclipse - 01-30-2009, 02:37 PM

HI all,

I m facing problem in connecting MSSQL database in Eclipse.
I hv went thru all the steps n tried all the solutions on net but still cant find the way thru
The error i m facing is -
Code:
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
	at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
	at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
	at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
	at com.microsoft.jdbc.sqlserver.tds.TDSConnection.<init>(Unknown Source)
	at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown Source)
	at com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown Source)
	at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)
	at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)
	at org.eclipse.datatools.connectivity.db.generic.JDBCConnection.createConnection(JDBCConnection.java:87)
	at org.eclipse.datatools.connectivity.DriverConnectionBase.internalCreateConnection(DriverConnectionBase.java:104)
	at org.eclipse.datatools.connectivity.DriverConnectionBase.open(DriverConnectionBase.java:53)
	at org.eclipse.datatools.connectivity.db.generic.JDBCConnectionFactory.createConnection(JDBCConnectionFactory.java:52)
	at org.eclipse.datatools.connectivity.internal.ConnectionFactoryProvider.createConnection(ConnectionFactoryProvider.java:77)
	at org.eclipse.datatools.connectivity.internal.ConnectionProfile.createConnection(ConnectionProfile.java:354)
	at org.eclipse.datatools.connectivity.ui.PingJob.run(PingJob.java:57)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

The things i tried are:-
1. checked TCP/IP setting in the sql server which is enabled n the port is also set properly, even tried changing the port n tried
2. The proper driver jar files r also thr...msbase.jar, mssqlserver.jar, msutil.jar
3. Even the database name is proper
4. SQL Server SP3 is also installed

When i try pinging the SQL from JDBC Connection Properties, it failes n the above error is displayed in details
The Connection URL is jdbc:microsoft:sqlserver://EQ:1443;Database Name=ENCODB
EQ is the pc name, changed the SQL Server port to 1443
n Driver Class is com.microsoft.jdbc.sqlserver.SQLServerDriver

Waiting for experts comment n help
Thanx in advance
Siddhesh Tawde
Reply With Quote
  (#2 (permalink)) Old
Moderator
 
jwenting's Avatar
 
Posts: 97
Thanks: 0
Thanked 8 Times in 8 Posts
Join Date: Feb 2008
Send a message via MSN to jwenting
Default 02-02-2009, 03:52 AM

can you access the port from elsewhere on your machine?
Usually such things are caused by firewalls blocking traffic.
Reply With Quote
  (#3 (permalink)) Old
Member
 
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jan 2009
Default 02-15-2009, 03:17 AM

yup i can access it from telnet,
but now i found 1 more problem, i did netstat -ab n found that sqlserver is not actuslly running on the port set, its running on totally sme diff port, n when i tried to use that port in eclipse it was jst showing "Connecting" for 30 mins, i got bored n closed it, is it coz of SQL Server SP ?

Finally after lots of unsuccessful T-&-E i downloaded MySql 5.1 and configured it for Eclipse n Jboss,
its running gr8
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
hello problem with jtable and database data pankajkaushal NetBeans 3 06-02-2009 04:00 PM
Database backup plugsharma Microsoft SQL Server 0 11-25-2008 12:26 PM
Loadind data in View from DataBase Fadjerx Eclipse 0 11-20-2008 04:26 AM
frazzled about connecting to dbase (MS Access) mrodent Microsoft Access 0 07-12-2008 01:16 PM
Connecting SCM from Eclipse vivekg Eclipse 0 07-10-2008 05:49 AM


Copyright 1997-2009, DZone, Inc.
vBulletin Skin developed by: vBStyles.com