title: Java SQL Server getImportedKeys on all user defined tables
body: <p>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:</p>
  
  <pre><code>meta.getImportedKeys(con.getCatalog(), dbName, null);
  </code></pre>
  
  <p>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</p>
  
  <pre><code>metaData.getTables(null, dbName, "%", null)
  </code></pre>
  
  <p>and iterating by substituting the third parameter on getImportedKeys.
  Is there an alternative to obtain the list of all relations from SQL Server?</p>