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

Thread: reuse clause in create tablespace command

  1. #1
    Join Date
    Nov 2002
    Location
    New Delhi, INDIA
    Posts
    1,796

    reuse clause in create tablespace command

    Hi All,

    I have a doubt, what is the purpose of the reuse in create tablespace command and when is it useful.

    create tablespace test datafile '/u1/oradata/GMI/test01.dbf' reuse;

    regards
    Amar

  2. #2
    Join Date
    Jan 2002
    Location
    Up s**t creek
    Posts
    1,525
    If you already have precreated OS datafiles it will use those, it allows you to pre-create large OS files (overnight for example)

    Regards
    Jim
    Oracle Certified Professional
    "Build your reputation by helping other people build theirs."

    "Sarcasm may be the lowest form of wit but its still funny"

    Click HERE to vist my website!

  3. #3
    Join Date
    Mar 2002
    Location
    Mesa, Arizona
    Posts
    1,204
    It's a handy option when you get half way through your database creation and something fails (ran out of space, syntax issue, etc.) and you need to re-run it... the previous datafiles have been created, so you just want to "reuse" them.

    In some environments datafiles take a long time to create. For example 8.0.x unicode, 500 mb datafile, on HP takes 20 minutes. Reusing an existing datafile is very handy in this scenario.
    "I do not fear computers. I fear the lack of them." Isaac Asimov
    Oracle Scirpts DBA's need

  4. #4
    Join Date
    Nov 2002
    Location
    New Delhi, INDIA
    Posts
    1,796
    Thanks

    but where do i get the existing datafile from....

    can this be from any database... what about the timestamp on the datafile... ??

    regards
    Amar

  5. #5
    Join Date
    Sep 2001
    Location
    Düsseldorf, Germany.
    Posts
    588
    If something goes wrong while adding datafile to tablespace, and if new datafile got created on OS, then you can re-issue the create or alter tablespace using "REUSE" clause so that Oracle will use existing datafile.. If the file doesn't exists then you can't use this option. It must be from same database, you can't share it from OS-to-OS or DB-to-DB.

    Sameer

  6. #6
    Join Date
    Mar 2002
    Location
    Mesa, Arizona
    Posts
    1,204
    Timestamp doesn't matter.
    "I do not fear computers. I fear the lack of them." Isaac Asimov
    Oracle Scirpts DBA's need

  7. #7
    Join Date
    Nov 2002
    Location
    New Delhi, INDIA
    Posts
    1,796

    Thumbs up

    :-)
    Thanks to all of u.

    Regards
    Amar

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