When can I safely drop a temporary tablespace?

I have a temporary tablespace in my database that I would like to get ride of.
It was created with a statement similar to this:
CREATE TEMPORARY TABLESPACE "TEMP"
blah blah blah. . .
I have checked dba_users and dba_extents. It is not used in either places.
Is there anywhere else I should check prior to executing a "DROP TABLESPACE" command?
Thank you,
-Kris

Query V$SORT_SEGMENT to check CURRENT_USERS for that TABLESPACE_NAME.
If CURRENT_USERS is 0, it is not in use currently.
Of course, query DBA_USERS to check TEMPORARY_TABLESPACE to see if it has been defined as the Temporary Tablespace for any user.
If you have only created a Temporary Tablespace but not assigned it as the DEFAULT TEMPORARY TABLESPACE at the Database level or any user's Temporary Tablespace with an ALTER USER command, then it wouldn't be in use !
Oracle starts using a Temporary Tablespace if either
a. It is the DEFAULT TEMPORARY TABLESPACE
b. It has been assigned as a User's Temporary Tablespace
c. It is part of a Temporary Tablespace Group that has been assigned
Hemant K Chitale
http://hemantoracledba.blogspot.com

Similar Messages

  • Dropping default temporary tablespace

    Hi
    (regarding Oracle 9i)
    I am getting two conflicting messages. The first one says you cannot drop a default temporary tablespace, and the second one says you can and that SYSTEM then becomes the default temporary tablespace. Which one is correct?
    http://www.idevelopment.info/data/Oracle/DBA_tips/Tablespaces/TBS_12.shtml says: The DBA cannot drop a default temporary tablespace, but it is possible to assign a new default temporary tablespace and then drop the old one. You also cannot change a default temporary tablespace to a permanent tablespace, nor can you take a default temporary tablespace offline.
    http://download.oracle.com/docs/cd/B10501_01/server.920/a96524/c04space.htm#1945 says: If you drop the default temporary tablespace, then the SYSTEM tablespace is used as the default temporary tablespace
    Which one is correct?!?!
    thanks

    select * from database_properties where property_name='DEFAULT_TEMP_TABLESPACE';
    PROPERTY_NAME
    PROPERTY_VALUE
    DESCRIPTION
    DEFAULT_TEMP_TABLESPACE
    TEMP
    Name of default temporary tablespace
    drop tablespace temp;
    drop tablespace temp
    ERROR at line 1:
    ORA-12906: cannot drop default temporary tablespaceBut as your earlier quotations make clear, there is nothing stopping from creating a NEW temporary tablespace, making that the default, and then dropping TEMP, the original-but-no-longer default.
    The principle is logical: a default's not much of a default if it can cease to exist. For a default to be meaningful, it has to be protected from being gotten rid of.
    The other thing you hinted at: the default default temporary tablespace is still SYSTEM, because it's the only tablespace that HAS to exist from the moment a database exists (though 10g elevates SYSAUX to almost the same status). So if you choose to create your database manually, using syntax of the form 'create database XXX....', it is allowed NOT to create a temporary tablespace. And if you choose to do that, then SYSTEM will be used as the default temporary tablespace.

  • I've used iPhoto to import photos from my camera.HOW and WHEN can I safely disconnect my camera for the mac mini.

    I've connected my digital camera to my 2013 mac mini and used iPhoto to import photos from the camera.
    HOW and WHEN can I safely remove the camera please?

    Dismount the camera by clicking on the unmount icon on the right in the iPhoto source pane. Once it is unmounted remove it
    LN

  • ORA-00600 Error, when Dropping one temporary tablespace

    Hi,
    I am using Oracle 10.1.0.2.0 on WinXPP, after I created a new temp tablespace and assigned one user to it as its temp tablespace, then trying to drop the old temp tablespace , I am getting the following Error . Can anybody pl. explain the reason.
    Steps I followed as...
    SYSTEM@orcl>create temporary tablespace checkup_tmp tempfile 'c:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL \CHECKUP_Tmp.dat' size 500M;
    Tablespace created.
    SYSTEM@orcl> alter user checkup temporary tablespace checkup_tmp;
    User altered.
    SYSTEM@orcl> drop tablespace CHECKUP_TEMP including contents;
    drop tablespace CHECKUP_TEMP including contents
    ERROR at line 1:
    ORA-00600: internal error code, arguments: [krf_gen_drop_tablespace-1], [], [],
    SYSTEM@orcl> drop tablespace CHECKUP_TEMP ;
    drop tablespace CHECKUP_TEMP
    ERROR at line 1:
    ORA-00600: internal error code, arguments: [krf_gen_drop_tablespace-1], [], [],
    Thanks in advance

    this is the bug 3984486
    consider upgrading.
    the workaround seems to flashback the DB...

  • Drop a temporary tablespace

    Hi all
    I have created a temporary tablespace temp01 and assign it as the default temporary tablespace for the database (10.0.2.0)
    How can I drop it without changing the default temporary tablespace?
    thanks for help

    phaeus wrote:
    Hello,
    create a new temporary tablespace. Make it to your default database temp tablespace and then you can drop the old one.
    A couple of thoughts I'd want to check on that - based on memories of problems in the dim and distant past.
    If you take this approach, do you still have to worry about users who have already got the dropped tablespace associated with their temp tablespace in dba_users ? Memory says they'll either get an error message, or they'll fall back to SYSTEM despite there being a new default.
    One of the reasons for creating tablespace groups for temporary tablespaces is that you can assign a tablespace group to a user, and then invisibly create and drop temporary tablespaces in that group without having to adjust the users' details. But there used to be a bug that resulted in excessive hits on dc_tablespaces if you did this, and extreme numbers of executions of a query against ts$ (or maybe file$).
    Regards
    Jonathan Lewis

  • Temporary Tablespace Sizing and SNOTE 164925

    Hi All,
    I am facing a dilemma when I look into the temporary tablespace setting.
    I have gone thru the SNOTE 164925, for the sizing parameters of PSAPTEMP.
    There is a calculation on the note for selecting initial extent next extent etc.....
    My PSAPTEMP is locally managed and having default initial extent value of 1 MB but as per the calculation given on SNOTE 164925 solution section.
    But the point is in the How Can I check the specified value section on the same note it says....
    "As of Oracle 8i, SAP recommends using the assignment of locally managed
    temporary tablespaces (see Notes 659946 and 662900). This means that when
    problems with a 'dictionary managed' temporary tablespace occur, you should
    change to a 'locally managed' temporary tablespace instead of optimizing
    the settings of the 'dictionary managed' temporary tablespace."
    Now my question is whther I should still go with the default value or with the new values as per the formula given in the same note.
    I am using Oracle 10g behind SAPR3 4.6D
    Regards,
    Soumen

    Hello Soumen,
    to be honest - i don't really understand your question / problem.
    Just use locally managed temporary tablespace and set an uniform size.
    The values initial, next and pctincrease doesn't matter in this case. Set the uniform size to 1 - 5 MB.
    As you told us you are using oracle 10g .. just check the documenation:
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_7003.htm#CJAIDDDB
    Specify LOCAL if you want the tablespace to be locally managed. Locally managed tablespaces have some part of the tablespace set aside for a bitmap. This is the default for permanent tablespaces. Temporary tablespaces are always automatically created with locally managed extents.
    AUTOALLOCATE specifies that the tablespace is system managed. Users cannot specify an extent size. You cannot specify AUTOALLOCATE for a temporary tablespace.
    UNIFORM specifies that the tablespace is managed with uniform extents of SIZE bytes.The default SIZE is 1 megabyte. All extents of temporary tablespaces are of uniform size, so this keyword is optional for a temporary tablespace. However, you must specify UNIFORM in order to specify SIZE. You cannot specify UNIFORM for an undo tablespace.
    Restriction on Dictionary-managed Tablespaces
    You cannot specify DICTIONARY if the SYSTEM tablespace of the database is locally managed or if you have specified the temporary_tablespace_clause.
    Regards
    Stefan

  • Temporary Tablespace growing Rapidly

    Hi
    My temporary tablespace is getting too large,now it is about 19GB,
    How can i mange it?How can i decrease it's size?
    Thank You In Advance

    Select from v$session & v$sort_usage to find out who is using the space. If no one is using the space currently the you can rebuild.
    for example:-
    CREATE
    TEMPORARY TABLESPACE "TMP" TEMPFILE
    'C:\oradata\TMP1.dbf' SIZE 2000M REUSE
    EXTENT MANAGEMENT LOCAL UNIFORM SIZE 131072K;
    ALTER DATABASE DEFAULT TEMPORARY TABLESPACE "TMP";
    Then drop TEMP including datafiles.
    If the name is needed you could then create a TEMP tablespace and return to the original name. The key to all of this is being able to monitor who is using TEMP space and why.
    N.B. I like setting a large uniform size to ensure most TEMP requests get the space in one hit per segment.

  • About Temporary Tablespace

    Hi DBA Guru(s),
    I have a general query about Temporary Tablespace that,
    if we drop the temporary tablespace then out database will run or not and
    also what will be the impact on database.
    Please suggest.
    Regards,
    Rajeev Kumar

    970371 wrote:
    Hi DBA Guru(s),
    I have a general query about Temporary Tablespace that,
    if we drop the temporary tablespace then out database will run or not and
    also what will be the impact on database.
    Please suggest.
    Regards,
    Rajeev KumarDatabase can start without Temp Tablespace but it will not be good idea since because the system tbs is used for sort segment.

  • Using temporary tablespace for sort in select statement without spacifying

    how can i use some particular temporary tablespace in select statement for sording without allocating any temporary tablespace to that user

    Try to set for the current session the in memory sorting space to 0 before running your query:
    SQL> alter session set sort_area_size = 0;The query should use the temporary tablespace.
    Message was edited by:
    Pierre Forstmann

  • Temporary tablespace in oracle 8i

    hi,
    i am working in oracle 8.1.7.4.0.i am creating a temporary tablespace.
    After creating the temp tablespace i am going to assign it as default temporary tablespace.
    alter database default temporary tablespace <tbs-name>;
    but its showing error...as
    ora-02231 - missing or invalid option to alter database,
    how to assign the default temporary tablespace in this oracle version.
    Rgds...

    You can not set the temporary tablespace at the database level as default temporary tablespace in Oracle 8i. From Oracle 9i onwards, you can create and assign the temporary tablespace at the database level.
    Only possible way in Oracle 8i is at the user level.
    i.e.
    SQL> alter user scott default tablespace TEMP;
    HTH.
    Regards,
    Sabdar Syed.

  • Temporary tablespaces in standby database

    Dear experts!
    i have just opened in read only mode my standby database for testing purposes.. The tempfiles are not there:
    SQL> select * from v$tempfile;
    no rows selected
    SQL>
    how do i proceed?
    thanking you in advance for your replies
    kind regards
    yogeeraj

    Hi Yogeeraj,
    You can add tempfiles to the temporary tablespace on standby database with alter tablespace command. It only requires tempfile.
    Regards
    Kamlesh

  • Temporary Tablespace Issues

    Hi,
    Temporary tablespace is getting full used.
    Temp Tablespace details:
    Size=110GB
    I need to find out that how we can estimate actual size of Temporary tablespace.
    Could you please guide me for the same.
    Also PGA_AGGREGATE_TARGET is defined as size of 7GB.
    Thanks,

    If you facing the size issue then create another temporary tablespace (lets call it TEMP2).
    The next step would be to remove the temporary tablespace you want to resize from being the default temporary tablespace by making TEMP2 the default. perform these activities in off time .
    Hope this may help you :)
    --neeraj                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Temporary tablespace Query

    Hi all,
    I have a query that whether to create a separate temporary table space for all user's and set as there default tablespace or the temporary table space which is created while creating db can be set as default temporary tablespace for all user's. So what the effect of that

    If your database have not any default temporary tablespace then system tablespace is going to be use.Therefore , it is better to user the default temporary tablespace.
    the temporary tablespace which is created while creating db can be set as default temporary tablespace for all user's.Keep this temporary tablespace as default . your intention should be that you have a default temporary tablespace where user's sorting and other operations may take place . The default temporay tablespace may be created at db creation or you have created after the db creation ..
    As far error concerned you don't have physical tempfile on disk .
    Hope this may help you :)
    --neeraj                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Drop Temporary Tablespace!

    Hi All,
    I have tried dropping my old temporary tablespace TEMP after making new TEMP2 as default.
    All the users (checked in dba_users) are using TEMP2 as default temporary tablespace.
    Now, issue is when I am trying to take TEMP offline and dropping it some of the users are not able to open the forms.
    Please suggest, is it necessary that I must do this activity after taking a proper downtime or I can do it in business hours.
    Thanks,
    Anchorage

    It's done now!!!
    Actually issue was
    You cannot drop a tablespace if it contains any rollback segments holding active transactions.*
    Try to check whether any one using the temp segments or not on query "v$sort_usage"*
    If it returns the rows, the sessions are using the temp tablespace. Once the Sessions Closes then the the command execution will be completed, else you and go head and kill the session with respect to session Id.*
    Which was been explained to me by Pavan in General Database Forum!
    I have killed the active session and it was success!
    Anchorage

  • When I drag and drop an icon from the address bar to the desktop is does creat the shortcut but will not display the website icon, only the firefox icon, how can I display website icons?

    When I drag and drop a website icon from the Forefox address bar to the desk top, the short cut is created but the icon that appears is the firefox Icon. I want to disply the icon from the website that the short cut refers to. I have checked all I can think of in my computer to no avail.

    You have to assign the favicon yourself to the desktop shortcut (right-click the shortcut: Properties) after you have dragged the link to the desktop.
    You can usually find the favicon in Tools >Page Info > Media and save the icon there.
    Otherwise use the main domain of the website and add favicon.ico (e.g. mozilla.com/favicon.ico ) to display the favicon in a tab and save that image to a folder.

Maybe you are looking for

  • How to call jsp in PLSQL code (to upload a file in IFS)

    Hello, We develop our PORTAL (9.0.2) with PL/SQL way. We want to make a form to upload file in IFS. We create a form like that : htp.formOpen(cmethod =>'post',      cenctype => 'multipart/form-data',      curl => '/pls/ptlcollab/ptlcollab.GestionDoc_

  • ISE 1.1.1 Patch 1 - Manifest.xml not found

    Hi, guys. Anyone already installed ISE 1.1.1 patch "ise-patchbundle-1.1.1.268-1-60802.i386.tar.gz" successfully ?? When trying to install it via gui, ise tells me that "manifest.xml" is not found in the archive ... But when I open the archive, the fi

  • Why socket policy file has 20 KB limitation?

    When I provide policy file over 20 KB on my socker server. Flash client will get security error #2048. And I observe the "policyfiles.txt". There is log like this: "錯誤: 正在忽略位於 xmlsocket://192.168.5.13:8843 的通訊端原則檔案,因為該檔案太大.通訊端檔案不得超過 20 KB." It mean p

  • How Do I Control The Order of Photos Displayed by an Emitter

    I have a Motion 4 particle emitter which is displaying a sequence of photographs and text (all transparent TIFs), which works exactly as required, except the customer has requested the photographs appear in a particular order. How can this be achieve

  • Should I upgrade iPhone 3G to iOS4.......yes....but be patient!

    Hi all I've been reading some horror stories the last few days, but I wanted everyone that's unsure about the update that it's not a nightmare for everyone. I for one didn't have any issues at all, but it did take over 5 hours to complete, so be prep