Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 335158 - Data source explorer does not display all foreign keys for SQL Server
Summary: Data source explorer does not display all foreign keys for SQL Server
Status: RESOLVED WONTFIX
Alias: None
Product: Data Tools
Classification: Tools
Component: Data Source Explorer (show other bugs)
Version: 1.8   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: future   Edit
Assignee: dtp.connectivity-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks: 334250
  Show dependency tree
 
Reported: 2011-01-24 03:53 EST by Gursel Koca CLA
Modified: 2011-01-24 13:44 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gursel Koca CLA 2011-01-24 03:53:11 EST
Build Identifier:  20100617-1415

Data source explorer displays only first foreign key of the selected table for SQL Server. I was using Dali to generate JPA entities from tables, DALI performs well for Oracle database, but not for SQL Server. Dali could not find relations between tables for SQL Server databases. I opened a bug against Dali,  its number is 334250. But it appears that the problem is not related to Dali, it is originated from data tools. 

Reproducible: Always
Comment 1 Brian Fitzpatrick CLA 2011-01-24 09:50:18 EST
Unfortunately, the people responsible for the latest iteration of the SQL Server support in DTP are no longer able to help us out and none of the rest of us have access to SQL Server databases for testing. 

I'm hoping that we can get some help from the community on this one. 

The issue itself is most likely due to issues interpreting what's coming back from the SQL Server JDBC driver. That will be in the catalog loader, which has to be customized for each JDBC driver. That code is located in the org.eclipse.datatools.enablement.msft.sqlserver plug-in in the org.eclipse.datatools.enablement.msft.internal.sqlserver.loaders package in the SQL2000TableLoader or SQL2005TableLoader classes. 

Can you provide some additional specifics regarding what you're using? 

What version of SQL Server are you going against? 

Are you using a generic driver like JTDS (http://jtds.sourceforge.net/) or an actual driver from Microsoft? And in either case, what version of the driver are you attempting to use? Have you tried the other driver?

If you look at the code for other table loaders in DTP, you may be able to figure out what you need to do that's specific to SQL Server. 

Sorry I can't help further, but at this point we don't have the resources.
Comment 2 Gursel Koca CLA 2011-01-24 13:25:49 EST
Well, it looks like this problem is related to jdbc 4.0 compliant drivers. I previously tested with drivers (micrososft jdbc driver 3.0, inetd and merlia) that jdbc 4.0 compliant. 

I have just tested with JTDS which is jdbc 3.0 compliant, it works as expected.
well, I want to thank you for mentioning jtds driver..
Comment 3 Brian Fitzpatrick CLA 2011-01-24 13:43:06 EST
(In reply to comment #2)
> Well, it looks like this problem is related to jdbc 4.0 compliant drivers. I
> previously tested with drivers (micrososft jdbc driver 3.0, inetd and merlia)
> that jdbc 4.0 compliant. 
> 
> I have just tested with JTDS which is jdbc 3.0 compliant, it works as expected.
> well, I want to thank you for mentioning jtds driver..

Well that's good news! There are definitely some interesting challenges in coding to JDBC across drivers and DBMSes. 

Glad the JTDS driver worked for you though!
Comment 4 Brian Fitzpatrick CLA 2011-01-24 13:44:55 EST
They found a workaround by using JDBC 3 drivers. We're going to close this.

At some point however, we need to see about the JDBC 4 vs. JDBC 3 compliance for Enablement.