Search code examples
database-schemasnapshotschemacrawler

How do I get SchemaCrawler to export actual table row data to the text output?


How do I get SchemaCrawler to export actual table row data to the text output? I can't find a example anywhere, nor documentation that refers to this option, although I have seen references on the internet implying that it can be done. I am able to export information about the schema, but it is just missing the data.

I'm using the Oracle version of SchemaCrawler. I'm using schemacrawler.config.properties but I cannot find a list anywhere of all the possible options. The command I use is like this:

java.exe -classpath lib/*;. schemacrawler.tools.oracle.Main -infolevel=maximum
-database=%5 -g=schemacrawler.config.properties -user=%1 -password=%2 
-schemas=%5 -port=%4 -host=%3 -table_types=TABLE -command="SELECT * FROM %5.%6" 
-sortcolumns=true

Solution

  • Try this:

    java.exe -classpath lib/*;. schemacrawler.tools.oracle.Main -infolevel=maximum
    -database=%5 -g=schemacrawler.config.properties -user=%1 -password=%2 
    -schemas=%5 -port=%4 -host=%3 -table_types=TABLE -command=dump 
    -sortcolumns=true
    

    or this (see enclosing quotes for the command)

    java.exe -classpath lib/*;. schemacrawler.tools.oracle.Main -infolevel=maximum
    -database=%5 -g=schemacrawler.config.properties -user=%1 -password=%2 
    -schemas=%5 -port=%4 -host=%3 -table_types=TABLE "-command=SELECT * FROM %5.%6" 
    -sortcolumns=true
    

    Sualeh Fatehi, SchemaCrawler