Suppose you have developed a script to redefine a table after confirming that the table can be redefined; however, the redefinition process fails in the middle and further attempts show that it cannot be redefined as materialized view exists on the table. Why did this happen and how can you recover from the situation? | Oracle DBA

The reason for this is that materialized view was created during initial attempt to redefine the table.
You can perform the following steps to recover from the situation:
i. Select log_table from user_snapshot_logs;
ii. Select master, log_table from userjnviewjogs;
iii. Drop materialized view log on listed by second query
iv. Start redefinition process again.
The preceding steps can be replaced by abort_redef_table as well; although, the preceding process is faster.