ORA-01950 on schema baseline/init in Oracle 12.1 #1093
The RESOURCE role in Oracle 12.1 doesn't include the unlimited quota for all tablespaces anymore. See: http://docs.oracle.com/database/121/DBSEG/release_changes.htm#BABEBGDI
This results in an ORA-01950 error on baseline, because the newly create user now has a quota of 0 for the default tablespace. When the first row is written to the metadata (schema_version) table, the quota is checked for the schema owner (created user). The user has a quota of 0 on the tablespace so nobody is allowed to write data into that schema.
The easiest way to fix this would be to add the UNLIMITED TABLESPACE grant to the doCreate() method in https://github.com/flyway/flyway/blob/master/flyway-core/src/main/java/org/flywaydb/core/internal/dbsupport/oracle/OracleSchema.java.
In my opinion it would make sense to add an optional placeholder/configuration for the default tablespace of the user and limiting the quota grant to the specified tablespace when the placeholder is present, though. You could change the tablespace for the user in a script, but everything that is written up to that point has already been written to the default tablespace. And in production environments you usually want dedicated tablespaces for your applications. (If you agree with this, I would open a separate issue for the placeholder, as they are separate concerns. One is a feature request for Oracle 12 support, the other one is a feature request for better production environment support.)
The text was updated successfully, but these errors were encountered: