DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: spooling out table definitions (structure) from sqlplus

  1. #1
    Join Date
    Jan 2004
    Posts
    50

    spooling out table definitions (structure) from sqlplus

    Pls how can i spool out table definitions/structure from the database via sqlplus.

  2. #2
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    spool table.txt
    desc table_name
    spool off

  3. #3
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    Here's a DBMS_METADATA sample ...
    Code:
    Set Long 100000 Pagesize 0
    Execute DBMS_Metadata.Set_Transform_Param(Dbms_Metadata.Session_Transform,'STORAGE',False);
    Select  DBMS_Metadata.Get_DDL('TABLE',table_name) From user_tables;
    Select  DBMS_Metadata.Get_DDL('INDEX',index_name) From User_Indexes;
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  4. #4
    Join Date
    Jan 2004
    Posts
    50
    thanx

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width