Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ORA-01950 on schema baseline/init in Oracle 12.1 #1093

sebtacke opened this issue Sep 11, 2015 · 1 comment

ORA-01950 on schema baseline/init in Oracle 12.1 #1093

sebtacke opened this issue Sep 11, 2015 · 1 comment


Copy link

The RESOURCE role in Oracle 12.1 doesn't include the unlimited quota for all tablespaces anymore. See:

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.
As the user is created in the baseline operation you cannot grant a quota beforehand and as the metadata is written before anything else is executed you cannot grant a quota in an SQL script.

The easiest way to fix this would be to add the UNLIMITED TABLESPACE grant to the doCreate() method in

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.)

axelfontaine pushed a commit to flyway/ that referenced this issue Oct 27, 2015
Copy link

Thanks Sebastian! I implemented the fix you suggested. For the tablespace, please +1 #865

@axelfontaine axelfontaine added this to the Flyway 4.0 milestone Oct 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

2 participants