<!DOCTYPE REFENTRY PUBLIC "-//Sun Microsystems//DTD DocBook V3.0-Based SolBook Subset V2.0//EN" [
<!--ArborText, Inc., 1988-1999, v.4002-->
<!ENTITY metainfo SYSTEM "metainfo.sgm">
<!ENTITY Dash "&ndash;">
<!ENTITY % commonents SYSTEM "smancommon.ent">
%commonents;
<!ENTITY % booktitles SYSTEM "booktitles.ent">
%booktitles;
]>
<?Pub UDT _bookmark _target>
<?Pub Inc>
<refentry id="capture-schema-1m">
<refmeta><refentrytitle>capture-schema</refentrytitle><manvolnum>1m</manvolnum>&metainfo;
</refmeta>
<refnamediv><indexterm><primary sortas="capture-schema">capture-schema &mdash;
stores the database metadata (schema) in a file for use in mapping and execution
</primary></indexterm><indexterm><primary sortas="stores the database metadata (schema) in a file for use in mapping an execution">
stores the database metadata (schema) in a file for use in mapping and execution &mdash;
capture-schema</primary></indexterm><refname>capture-schema</refname><refpurpose>
 stores the database metadata (schema) in a file for use in mapping and execution
</refpurpose></refnamediv>
<refsynopsisdiv><title>&synp-tt;</title>
<cmdsynopsis><command>capture-schema </command><arg choice="plain">&Dash;username <replaceable>
name</replaceable></arg><arg choice="plain">&Dash;password <replaceable>password
</replaceable></arg><arg choice="plain">&Dash;dburl <replaceable>url</replaceable></arg>
<arg choice="plain">&Dash;driver <replaceable>jdbc_driver_classname</replaceable></arg>
<arg>&Dash;schemaname <replaceable>schemaname</replaceable></arg><arg>&Dash;table <replaceable>
tablename</replaceable></arg><arg choice="plain">&Dash;out <replaceable>filename
</replaceable></arg>
</cmdsynopsis></refsynopsisdiv>
<refsect1><title>&desc-tt;</title>
<para>Stores the database metadata (schema) in a file.</para>
<para>Run <command>capture-schema</command> as the same database user that
owns the table(s), and use that same username with the <option>username</option>
option (and <option>schemaname</option>, if required).</para>
<para>When running <command>capture-schema</command> against an Oracle database,
you should grant the database user running the <command>capture-schema</command>
command the <literal>ANALYZE ANY TABLE</literal> privilege.</para>
<para>You can also use the Sun Java System Studio IDE to capture the database
schema.</para>
</refsect1>
<refsect1><title>&opts-tt;</title>
<para><variablelist termlength="medium">
<varlistentry><term><option>username</option></term><listitem><para>user name
for authenticating access to a database.</para>
</listitem></varlistentry>
<varlistentry><term><option>password</option></term><listitem><para>password
for accessing the selected database.</para>
</listitem></varlistentry>
<varlistentry><term><option>dburl</option></term><listitem><para>JDBC URL
required by the driver for accessing a database.</para>
</listitem></varlistentry>
<varlistentry><term><option>driver</option></term><listitem><para>JDBC driver
classname in your <literal>CLASSPATH</literal>.</para>
</listitem></varlistentry>
<varlistentry><term><option>schemaname</option></term><listitem><para>name
of the user schema being captured. If not specified, the default will capture
metadata for all tables from all the schemas accessible to this user.</para>
<para><emphasis>Specifying this parameter is highly recommended.</emphasis>
Without this option, if more than one schema is accessible to this user, more
than one table with the same name may be captured, which will cause problems
when mapping CMP fields to tables.</para>
<para>The specified schema name must be uppercase.</para>
</listitem></varlistentry>
<varlistentry><term><option>table</option></term><listitem><para>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 captured.</para>
<para>The specified table name or names are case sensitive. Be sure to match
the case of the previously created table names.</para>
</listitem></varlistentry>
<varlistentry><term><option>out</option></term><listitem><para>name of the
output file. This option is required. If the specified output file does not
contain the <literal>.dbschema</literal> suffix, it will be appended to the
filename.</para>
</listitem></varlistentry>
</variablelist></para>
</refsect1>
<refsect1><title>&exam-tt;</title>
<example>
<title>U<?Pub Caret1>sing capture-schema</title>
<screen><userinput>capture-schema -username cantiflas -password enigma
 -dburl jdbc:oracle:thin:@sadbuttrue:1521:ora817 -driver oracle.jdbc.driver.OracleDriver
 -schemaname CANTIFLAS -out cantiflas.dbschema</userinput></screen>
</example>
</refsect1>
<refsect1><title>&also-tt;</title>
<para><link linkend="asadmin-1m"><citerefentry><refentrytitle>asadmin</refentrytitle>
<manvolnum>1M</manvolnum></citerefentry></link> </para>
</refsect1>
</refentry>
<?Pub *0000004877>
