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

Thread: How to Convert Tablespace to Temporary.

  1. #1
    Join Date
    May 2001
    Location
    Maryland, USA
    Posts
    409
    Hi All,
    I have a Database in which temporary Tablespace is defined with Datafiles instead of Temp Files. What steps I need to follow to convert this 'Temp' Tablespace(Dictionary managed) into True Temporary Tablespace. The users are created with 'this tablespace' as temporary Tablespace.

    Thanks.
    -- Dilip

  2. #2
    Join Date
    Jan 2002
    Location
    Up s**t creek
    Posts
    1,525
    Just use command:

    ALTER TABLESPACE "TEMP" TEMPORARY;

    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
    May 2001
    Location
    Maryland, USA
    Posts
    409
    Thanks Jovery, But is it okay if I run this command with active users or Do I need to ask them to stop working till this conversion is done.

    Thanks.
    -- Dilip

  4. #4
    Join Date
    Jan 2002
    Location
    Up s**t creek
    Posts
    1,525
    I think assuming there are no temporary segments in use it is okay to do it while users are accessing the system.

    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!

  5. #5
    Join Date
    Apr 2001
    Location
    Czechia
    Posts
    712
    Correct me if I'm wrong, but I think it's not possible to convert a dictionary managed temporary tablespace to a locally managed temporary tablespace just with "ALTER TABLESPACE TEMPORARY".
    Ales
    The whole difference between a little boy and an adult man is the price of toys

  6. #6
    Join Date
    Jan 2002
    Location
    Netherlands
    Posts
    1,587
    For a true temporary tablespace --
    Do
    drop tablespace temp;
    then
    create temporary tablespace temp tempfile '/bla/bla'...

    Cheers
    Tarry Singh
    I'm a JOLE(JavaOracleLinuxEnthusiast)
    TarryBlogging
    --- Everything was meant to be---

  7. #7
    Join Date
    Jan 2002
    Location
    Netherlands
    Posts
    1,587

    My 700th post!!

    Maybe a little more clearer....
    Code:
    Connected to:
    Oracle8i Enterprise Edition Release 8.1.6.0.0 - Production
    With the Partitioning option
    JServer Release 8.1.6.0.0 - Production
    
    appdev@NICK.WAGENBORG.COM>alter tablespace TEMP temporary;
    alter tablespace TEMP temporary
    *
    ERROR at line 1:
    ORA-01661: tablespace 'TEMP' is already temporary
    
    
    appdev@NICK.WAGENBORG.COM>alter tablespace TEMP permanent;
    
    Tablespace altered.
    
    appdev@NICK.WAGENBORG.COM>alter tablespace TEMP temporary;
    
    Tablespace altered.
    
    
    
    appdev@NICK.WAGENBORG.COM>drop tablespace TEMP;
    
    Tablespace dropped.
    
    appdev@NICK.WAGENBORG.COM>CREATE TEMPORARY TABLESPACE lmtemp TEMPFILE 
      2  'D:\Oracle\oradata\nick\LMT_TEMP01.dbf' size 60M reuse
      3  EXTENT MANAGEMENT LOCAL UNIFORM SIZE 10M;
    
    Tablespace created.
    Cheers!!
    Tarry Singh
    I'm a JOLE(JavaOracleLinuxEnthusiast)
    TarryBlogging
    --- Everything was meant to be---

  8. #8
    Join Date
    May 2001
    Location
    Maryland, USA
    Posts
    409

    Wink

    My 70th Post.

    Thanks Tarry, this is what I wanted. Ales, you was rite. I had to drop the Tablespace and recreate it.
    -- Dilip

  9. #9
    Join Date
    Aug 2001
    Location
    Waterloo, On
    Posts
    547
    If I can just add, one must check V$SORT_USAGE to be sure no body is using temp segments, before dropping the temp tablespace.

    Raminder Singh

    Oracle Certified DBA: Oracle 8i, 9i


    Mail me at raminderahluwalia@rediffmail.com.

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