1Z0-050 · Question #90
You need to perform an online table redefinition of an existing SALES table to partition it into two tablespaces TBS1 and TBS2. The SALES table has a materialized view, materialized log, indexes…
The correct answer is D. The dependent materialized view should have a complete refresh performed after the online table. See the full explanation below for the reasoning.
Question
You need to perform an online table redefinition of an existing SALES table to partition it into two tablespaces TBS1 and TBS2. The SALES table has a materialized view, materialized log, indexes, referential integrity constraint, and triggers with the PRECEDES clause existing on it. What action is required for dependent objects when you perform online table redefinition?
Options
- AThe materialized log should be dropped before the online table redefinition process.
- BTriggers with the PRECEDES clause should be disabled before the online table redefinition process.
- CReferential integrity constraints must be manually enabled after the online table redefinition process.
- DThe dependent materialized view should have a complete refresh performed after the online table
How the community answered
(63 responses)- A5% (3)
- B16% (10)
- C6% (4)
- D73% (46)
Community Discussion
3Think of a materialized view like a photocopy of a document. If someone replaces the original document with a reorganized version while you were mid-copy, that photocopy is now out of date and you cannot trust it reflects the new original. That is exactly what happens during online table redefinition: the base table gets structurally rebuilt underneath the materialized view, so the view's snapshot is stale when the process finishes. The correct answer is D. After online table redefinition completes, you must perform a complete refresh on any dependent materialized view to bring it back in sync with the newly partitioned table. The other options are distractors because Oracle's DBMS_REDEFINITION package automatically handles materialized view logs, triggers including those with PRECEDES clauses, indexes, and referential integrity constraints during the redefinition process without requiring manual intervention on your part before or after.
D is the right call, and here is why the others fall apart under scrutiny. DBMS_REDEFINITION is designed to handle most dependent objects automatically: the materialized view log is preserved, referential integrity constraints are automatically re-enabled by the finish_redef_table procedure, and triggers including those with PRECEDES are carried over without any manual intervention. The one thing Oracle cannot silently fix for you is the staleness of a dependent materialized view, because the underlying rowids and structure have changed, so a complete refresh is required to bring that MV back into a consistent state with the newly partitioned table. On my actual 1Z0-050 sitting a few years back I burned about three minutes on this one because option C looked so tempting. We spend so much time in the Advanced Administration course drilling constraint management that your brain wants to pick it. What saved me was remembering a lab where I ran CAN_REDEF_TABLE and then FINISH_REDEF_TABLE and watched the constraint status in DBA_CONSTRAINTS flip back to ENABLED on its own. Once I recalled that, C was clearly a distractor, and D was the only option describing something you genuinely have to do yourself. Map this to the official 1Z0-050 topic Managing Database Objects, specifically the subtopic Performing Online Table Redefinition. Memory hook: after redefinition, your MV is blind, give it a complete refresh so it can see again.
Option B tripped me up at first because I kept thinking those PRECEDES triggers sounded fancy and fragile, but Oracle actually carries dependent objects like triggers and constraints through the redefinition process automatically, so no manual disabling is needed. The answer is D, because after the redefinition the materialized view's underlying data has changed in a way the MV log cannot reconcile on its own, so a complete refresh is required to get it back in sync.