Script to get all the table definitions under one user name
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: Script to get all the table definitions under one user name

  1. #1
    Join Date
    Jun 2000
    Posts
    315

    Script to get all the table definitions under one user name

    Does anyone know a script to get all the table definition of one schema in once?

    Thanks!

    Lisa

  2. #2
    Join Date
    Oct 2000
    Location
    Germany
    Posts
    1,185
    You might be able to use the

    fromuser and touser

    options of import to get what you want.
    David Knight
    OCP DBA 8i, 9i, 10g

  3. #3
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,448
    you could use dbms_metadata if you are using 9i

    select dbms_metadata.get_ddl('TABLE', table_name) from user_tables

  4. #4
    Join Date
    Apr 2001
    Location
    Louisville KY
    Posts
    295
    The easiest is probably to export the user, ROWS=N, then generate an indexfile using import. (With the right editor, you don't even need the import step.)

    I have an old script to dump a user (it goes back to V6), but the above is cleaner and more consistent.
    Joseph R.P. Maloney, CSP,CDP,CCP
    'The answer is 42'

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