User Commands                                  capture-schema(1m)

NAME
     capture-schema -  stores the database metadata (schema) in a
     file for use in mapping and execution

SYNOPSIS
     capture-schema  -username name -password password -dburl url
     -driver  jdbc_driver_classname  [-schemaname  schemaname] [-
     table tablename] -out filename

DESCRIPTION
     Stores the database metadata (schema) in a file.

     Run capture-schema as the same database user that  owns  the
     table(s),  and  use  that  same  username with the -username
     option (and -schemaname, if required).

     When running capture-schema against an Oracle database,  you
     should  grant  the  database user running the capture-schema
     command the ANALYZE ANY TABLE privilege.

     You can also use the Sun Java System Studio IDE  to  capture
     the database schema.

OPTIONS
     -username               user name for authenticating  access
                             to a database.

     -password               password for accessing the  selected
                             database.

     -dburl                  JDBC URL required by the driver  for
                             accessing a database.

     -driver                 JDBC  driver   classname   in   your
                             CLASSPATH.

     -schemaname             name of the user schema  being  cap-
                             tured. If not specified, the default
                             will capture metadata for all tables
                             from  all  the schemas accessible to
                             this user.

                             Specifying this parameter is  highly
                             recommended.   Without  this option,

                             if more than one schema is  accessi-
                             ble  to  this  user,  more  than one
                             table with the same name may be cap-
                             tured,  which  will  cause  problems
                             when mapping CMP fields to tables.

                             The specified schema  name  must  be
                             uppercase.

     -table                  name  of  a  table;  multiple  table
                             names  can be specified. If no table
                             is specified, all the tables in  the
                             database  or  named  schema are cap-
                             tured.

                             The specified table  name  or  names
                             are case sensitive. Be sure to match
                             the case of the  previously  created
                             table names.

     -out                    name of the output file. This option
                             is required. If the specified output
                             file does not contain the  .dbschema
                             suffix,  it  will be appended to the
                             filename.

EXAMPLES
     Example 1: Using capture-schema

     capture-schema -username cantiflas -password enigma
      -dburl jdbc:oracle:thin:@sadbuttrue:1521:ora817 -driver oracle.jdbc.driver.OracleDriver
      -schemaname CANTIFLAS -out cantiflas.dbschema

SEE ALSO
     asadmin(1M)
