metadata for complete tables and indexes


set pagesize 0
set long 90000
set feedback off
set echo off
spool anar.sql
SELECT DBMS_METADATA.GET_DDL('TABLE',u.table_name)FROM USER_TABLES u;
SELECT DBMS_METADATA.GET_DDL('INDEX',u.index_name)FROM USER_INDEXES u;
spool off;
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: