Applies to:
- Liquibase Pro
- Liquibase Open Source (Community)
Summary:
For applications that only have one database schema, it is convenient to use the application schema to deploy database changes using Liquibase.
- The application schema does not require elevated privileges since it will only deploy objects within the schema.
- Developers do not have to specify a schema for database objects in their changelogs.
- The Liquibase tracking tables will be created in the application schema.
Environment Conditions:
- Any version of Liquibase
- Any version of Oracle
How to:
The Liquibase account used to deploy to a single Oracle schema project needs certain privileges to be able to deploy scripts. Below are the steps to create a Liquibase user for an Oracle project that has a single schema.
Step 1: Create a user account
The following script will create and configure an application schema/user to run Liquibase. You should modify the script to specify an appropriate tablespace for your database.
Below is an example of creating a liquibase user.
CREATE USER LIQUIBASE IDENTIFIED BY 'LIQUIBASE_passwd' DEFAULT TABLESPACE USERS QUOTA UNLIMITED ON USERS;
Step 2: Grant needed permissions
Once the user has been created, the following grants need to be applied to the service account.
GRANT CREATE SESSION TO LIQUIBASE;
GRANT CREATE MATERIALIZED VIEW TO LIQUIBASE;
GRANT CREATE PROCEDURE TO LIQUIBASE;
GRANT CREATE SEQUENCE TO LIQUIBASE;
GRANT CREATE SYNONYM TO LIQUIBASE;
GRANT CREATE PUBLIC SYNONYM TO LIQUIBASE;
GRANT CREATE TABLE TO LIQUIBASE;
GRANT CREATE TRIGGER TO LIQUIBASE;
GRANT CREATE TYPE TO LIQUIBASE;
GRANT CREATE VIEW TO LIQUIBASE;
Related Article(s):
How to Configure an Oracle Service Account for Liquibase Multi-Schema Projects
Comments
0 comments
Article is closed for comments.