DB Explorer unable to show Oracle tables and columns remarks

Home Forums Archived Forums MyEclipse Archived Database Tools (DB Explorer, Hibernate, etc.) DB Explorer unable to show Oracle tables and columns remarks

This topic contains 2 replies, has 2 voices, and was last updated by Profile photo of Francesc Rosés Francesc Rosés 3 years, 10 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #319585
    Profile photo of Francesc Rosés
    Francesc Rosés
    Participant

    Hello,

    I’m using an Oracle database in one of my projects and I observed DB Explorer is unable to show Oracle tables and columns remarks.

    I think may be interestig DB Explorer can show this metadata info.

    I know there is a trick to obtain Oracle tables and columns names. If you use java.sql.Connection.getMetaData() method the names are missing. By default, Oracle JDBC driver do not provides the names. You must do a casting to oracle.jdbc.driver.OracleConnection class and use the method setRemarksReporting(boolean) to force the driver to provide this information:

    java.sql.Connection con = ....
    jdbc.driver.OracleConnection oCon = (jdbc.driver.OracleConnection) con;
    oCon.setRemarksReporting(true);
    DatabaseMetaData md = oCon.getMetaData();
    ResultSet rs = md.getTables("null", "aSchema", "aTableName", new String[] {"TABLE"});
    while (rs.next()) {
      String remarks = rs.getString("REMARKS");
    }

    May be the DB Explorer problem not showing Oracle remarks is not the bizarre method needed to obtain Oracle metadata. But if this is the problem, I hope this few lines of code can help you.

    Best regards and thanks for your excellent work!

    Francesc Rosés

    #319604
    Profile photo of support-tony
    support-tony
    Keymaster

    Francesc,

    Thanks for pointing out this omission. I’ve raised a problem report for the lack of column comments and an enhancement request to show table comments.

    Thanks, also, for the hints on how this may be implemented.

    #319736
    Profile photo of Francesc Rosés
    Francesc Rosés
    Participant

    You’re welcome!

    Francesc Rosés

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘DB Explorer unable to show Oracle tables and columns remarks’ is closed to new replies.