How to fix the Oracle error ORA-01955: DEFAULT ROLE ‘string’ not granted to user?

In this post, you’ll learn more about the Oracle ErrorORA-01955: DEFAULT ROLE ‘string’ not granted to user with the details on why you receive this error and the possible solution to fix it.

Oracle Error Description

ORA-01955: DEFAULT ROLE ‘string’ not granted to user

Reason for the Error ORA-01955: DEFAULT ROLE ‘string’ not granted to user

The user being altered does not have the specified role granted directly to the user. Note, sub-roles cannot be used in the default role clause.

How to fix the Error ORA-01955: DEFAULT ROLE ‘string’ not granted to user ?

You can fix this error in Oracle by following the below steps

Grant the role to the user.