Oracle Error ORA-01042: detaching a session with open cursors not allowed

Oracle Error Message

ORA-01042: detaching a session with open cursors not allowed

Reason for the Error

An attempt was made to detach a seesio n which had open cursors.

Solution

Close all the cursors before detaching the session.