What will this statement do? CREATE TABLESPACE temp
DATAFILE ‘C:\database\temp.dbf’ SIZE 10m
Temporary;
A. Create a tablespace that will be dropped on instance shutdown.
B. Create a tablespace in which the user can create segments for usage during sorts.
C. Create a tablespace in which Oracle can create segments for usage during sorts.
D. Create a tablespace in which a user can create tables that will be automatically dropped after a week.
Answer: C
Explanation:
This command creates a tablespace in which Oracle can create segments for usage during sorts.
Incorrect Answers
A: You cannot drop the default temporary tablespace until another has been created because doing so would leave the database with nowhere to perform to-disk sorts. Unlike a sort segment stored in a permanent tablespace, the sort segment in the temporary tablespace is not dropped when the user’s sort completes.
Instead, the first sort operation following instance startup creates a sort segment that remains in the temporary tablespace for reuse by subsequent users who also perform sorts to disk. This sort segment will remain in the temporary tablespace until instance shutdown. So only a sort segment will be dropped, not entire tablespace on instance shutdown.
B: User itself cannot create any objects in the temporary tablespace: it is used exclusively by Oracle.
D: User itself cannot create any objects in the temporary tablespace: it is used exclusively by Oracle.
OCP: Oracle 9i Performance Tuning Study Guide, Joseph C. Johnson, p. 420-423
Chapter 8: Tuning Disk I/O