Oracle Error ORA-42287: cannot rename user on whose type a table depends

Oracle Error Message

ORA-42287: cannot rename user on whose type a table depends

Reason for the Error

An attempt was made to rename a user whose schema contained a type on which some table depends. The operation may not proceed as it would render the table invalid causing loss of data.

Solution

Drop table(s) dependent on types belonging to the schema of the user being renamed.