Temporary Tablespace

1
1. What happens when the DEFAULT and TEMP tablespace clauses are left out from C REATE USER statements? The user is assigned the SYSTEM tablespace as a default and temporary tablespace . This is bad because it causes user objects and temporary segments to be placed into the SYSTEM tablespace resulting in fragmentation and improper table placem ent (only data dictionary objects and the system rollback segment should be in S YSTEM). 2. How will you know which temporaray tablepsace is allocated to which user? SQL> Select temporary_tablespace from dba_users where username=â SCOTTâ ; 3. How will you find the current users who are using temporary tablespace segmen ts? SQL> V$TEMPSEG_USAGE 4. In 10g, How to allocate more than one temporary tablespace as default tempora ry tablespace to a single user? By using temporary tablespace group 5. Is it possible to make tempfiles as read only? YES. 6. What is the difference between a TEMPORARY tablespace and a PERMANENT tablesp ace? TEMPORARY tablespace gets cleared once the transaction is done where as PERMANEN T tablespace retails the data. 7. You see multiple fragments in the SYSTEM tablespace, what should you check fi rst? Ensure that users don?t have the SYSTEM tablespace as their TEMPORARY or DEFAULT tablespace assignment by checking the DBA_USERS view.

description

temp

Transcript of Temporary Tablespace

Page 1: Temporary Tablespace

1. What happens when the DEFAULT and TEMP tablespace clauses are left out from CREATE USER statements?

The user is assigned the SYSTEM tablespace as a default and temporary tablespace. This is bad because it causes user objects and temporary segments to be placed into the SYSTEM tablespace resulting in fragmentation and improper table placement (only data dictionary objects and the system rollback segment should be in SYSTEM).

2. How will you know which temporaray tablepsace is allocated to which user?

SQL> Select temporary_tablespace from dba_users where username=�SCOTT�;

3. How will you find the current users who are using temporary tablespace segments?

SQL> V$TEMPSEG_USAGE

4. In 10g, How to allocate more than one temporary tablespace as default temporary tablespace to a single user?

By using temporary tablespace group

5. Is it possible to make tempfiles as read only?

YES.

6. What is the difference between a TEMPORARY tablespace and a PERMANENT tablespace?

TEMPORARY tablespace gets cleared once the transaction is done where as PERMANENT tablespace retails the data.

7. You see multiple fragments in the SYSTEM tablespace, what should you check first?

Ensure that users don?t have the SYSTEM tablespace as their TEMPORARY or DEFAULT tablespace assignment by checking the DBA_USERS view.