Oracle Error ORA-42298: cannot rename a user that is currently connected

Oracle Error Message

ORA-42298: cannot rename a user that is currently connected

Reason for the Error

An attempt was made to rename a user that was logged on.

Solution

Make sure user is logged off, then repeat command.