SQL*Loader   «Prev  Next»

Relocate an Oracle 26ai Table - Exercise

Course Project: Move Customer Data to Another Tablespace

Objective: Write a table-move statement, account for indexes, and distinguish relocation from increasing existing storage capacity.

Background and Assumptions

House-O-Pets has provisioned CUSTOMER_SPACE on approved additional storage. Move the customer table into that existing tablespace in the same Oracle 26ai application PDB. The destination's underlying file placement has already been verified; a tablespace name alone does not identify a physical disk.

Retain the legacy name CUSTOMER_OBJ_TABLE, but for this exercise assume an ordinary nonpartitioned heap-organized relational table, not an Oracle object table. It has conventional nonpartitioned B-tree indexes and no LOB, LONG, nested-table, or object-type columns. Specialized storage would require a separate plan.

Assume an approved maintenance window with application writes stopped, sufficient target space for the new segment, a writable destination, and appropriate table-alteration authority and owner quota. The existing indexes are valid. This is a written exercise; the website does not execute submitted SQL.

Instructions

Submit numbered answers to all three questions:

  1. Write the SQL statement that moves CUSTOMER_OBJ_TABLE into CUSTOMER_SPACE. Keep its existing indexes usable, or explicitly describe how you would repair affected indexes before restoring application access. Include a query, run as the table owner, that checks the resulting tablespace.
  2. Besides placing the table where it has room to grow, describe one possible benefit of rebuilding its segment through a move. Explain why this does not guarantee a smaller datafile or faster queries.
  3. If the only goal were more capacity, how could you expand the original tablespace without moving the table? Distinguish smallfile from bigfile tablespaces and identify the capacity checks required.

Use an offline move for this scenario. An online move is not required. Review the actual table and index features before selecting any production procedure.

Exercise Scoring

This exercise uses a 10-point rubric for self-review or instructor assessment. The website does not calculate a score automatically.

Manual scoring, 10 points maximum
AnswerPoints
Correct MOVE statement (2), index-maintenance strategy (1), and verification query (1).4
Explains a potential reorganization benefit (2) without promising automatic disk shrinkage or faster queries (1).3
Explains growth options for both smallfile and bigfile tablespaces (2), subject to available capacity and applicable limits (1).3

Submit Your Answers

Submit all three responses together to compare them with the reference solution.