ALTER USER Statement - Oracle to MariaDB Migration

In Oracle and MariaDB, the ALTER USER statement modifies an existing user, but some clauses can differ and require conversion.

DEFAULT ROLE ALL

Oracle allows you to enable all roles granted to a user at logon.

Oracle:

  ALTER USER "USER1" DEFAULT ROLE ALL;
  /* User altered. */

In MariaDB, you have to use the SET DEFAULT ROLE statement, and you can specify only one default role:

MariaDB:

  SET DEFAULT ROLE role1 FOR "USER1";
  /* Query OK, 0 rows affected */

For more information, see Oracle to MariaDB Migration.