Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Duplicate Tables with indexs

Re: Duplicate Tables with indexs

From: gazzag <gareth_at_jamms.org>
Date: 19 Oct 2005 07:18:12 -0700
Message-ID: <1129731492.818094.278900@f14g2000cwb.googlegroups.com>


A couple of ways:

  1. Run an export of the required schema with the "rows=n" option. The dump file produced will need a bit of manipulation but the required DDL will be in it.
  2. Use DBMS_METADATA:

e.g.

set long 20000
connect XAL_<user>/<password>

SELECT DBMS_METADATA.GET_DDL('TABLE',u.table_name)

     FROM USER_TABLES u;

SELECT DBMS_METADATA.GET_DDL('INDEX',i.index_name)

     FROM USER_INDEXES i; Received on Wed Oct 19 2005 - 09:18:12 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US