Use SQL*Plus to test a tablespace configuration with multiple datafiles – 50 poi
ID: 3809138 • Letter: U
Question
Use SQL*Plus to test a tablespace configuration with multiple datafiles – 50 points Create a tablespace with one datafile. Use a uniform extent of 40 KB. Create three tables in this tablespace, and manually allocate 3 extents to each in turn (a total of 9 extents). Run a query against DBA_EXTENTS to find the physical location of each extent for each table. Add a second datafile to the tablespace. Manually allocate 2 more extents in turn to each table (a total of 6). Re-run the same query over DBA_EXTENTS. Manually allocate 3 more extents to first table, followed by 1 extent to the second table. Re-run the same query over DBA_EXTENTS. Tidy up by dropping the new tablespace with contents and datafiles. (1) Provide all interaction with the database, all the SQL queries (create, drop, select, etc.) and their corresponding results.
Explanation / Answer
The various interaction with database are as follows:
i) tablespace creation with one datafile
CREATE TABLESPACE tbspace1 DATAFILE '/u01/oracle/data/tbspace1.dbf' SIZE 50KB
ii) we have created three tables using following command:
CREATE TABLE table_name (
col1 datatype,
col2 datatype,
col3 datatype,
....
);
iii) Select command can be used as follows:
SELECT * FROM table_name;
iv) Drop command has been used for drop a table from tablespace
DROP table table_name
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.