I am currently working on SQL Server. I'd need to get all the relationships between tables in a schema. I was able to perform this operation by getMetaData on Oracle through:
meta.getImportedKeys(con.getCatalog(), dbName, null);
The same does not occur on SQL Server as the former throws the exception requiring the third parameter. My idea is to get the list of all the tables with
metaData.getTables(null, dbName, "%", null)
and iterating by substituting the third parameter on getImportedKeys. Is there an alternative to obtain the list of all relations from SQL Server?