0

I am using SchemaCrawler 8.17 for Oracle and MSSQL. The code is implemented in Java. I have following issues :

  1. Taking too much time for Oracle database.
  2. Unable to find schema for MSSQL database.

I tried using INFORMATION SCHEMA VIEWS also to boost performance but I doubt SchemaCrawler is not able to use INFORMATION SCHEMA VIEWS for Oracle. Here is the code snippet :

DataSource dataSource = new DatabaseConnectionOptions("oracle.jdbc.driver.OracleDriver",
              "jdbc:oracle:thin:@xx.xx.xx.xx:orcl");

  Connection connection = dataSource.getConnection("xxx", "xxx");


  Config config = getSchemaCrawlerConfig(RDBMSType.ORACLE);
 SchemaCrawlerOptions options = new SchemaCrawlerOptions(config);
//  SchemaCrawlerOptions options = new SchemaCrawlerOptions(config);



  SchemaInfoLevel schemaInfoLevel = new SchemaInfoLevel();  
  schemaInfoLevel.setTag("Custom Info Level");          
  schemaInfoLevel.setRetrieveTables(true);
  schemaInfoLevel.setRetrieveTableColumns(true);
  schemaInfoLevel.setRetrieveForeignKeys(true);
  schemaInfoLevel.setRetrieveColumnDataTypes(true);

    options.setSchemaInfoLevel(schemaInfoLevel);
  options.setProcedureInclusionRule(new InclusionRule(InclusionRule.NONE,
                                                    InclusionRule.ALL));
  options.setSchemaInclusionRule(new InclusionRule("XXX",InclusionRule.NONE));

For creating the config I am using the below code snippet :

Properties prop = new Properties();
          FileInputStream fs = new FileInputStream(new File("D:\\schemacrawler-oracle.config.properties"));
          //InputStream in = ApiExample.class.getResourceAsStream("D:\\schemacrawler-oracle.config.properties");


      try {
          prop.load(fs);
          fs.close();
      } catch (IOException e) { 
        // TODO Auto-generated catch block
          e.printStackTrace();
      }


      Config config = new Config(prop);

How can I validate whether SchemaCrawler is using INFORMATION SCHEMA VIEWS??

David Jones
  • 4,766
  • 3
  • 32
  • 45
Neo
  • 93
  • 1
  • 12

1 Answers1

0

Neo,

Oracle does not support information schema views. That being said, SchemaCrawler does use the Oracle system tables. You need to download and use the SchemaCrawler distribution for Oracle. You can save considerable time in the time taken to crawl the database if you limit the schemas that you scan, using the right set of SchemaCrawlerOptions. This applies to Microsoft SQL Server too - please use the SchemaCrawler distribution for Microsoft SQL Server. If you have any more specific questions, please contact me directly. You are better off using the latest SchemaCrawler version, 10.08.04.

Sualeh Fatehi, SchemaCrawler

Sualeh Fatehi
  • 4,700
  • 2
  • 24
  • 28