Applies to:
- Liquibase Enterprise (DaticalDB)
Conditions:
- Using Oracle
- Liquibase Enterprise versions 8.1 and later
Issue Summary:
When deploying scripts using SQLPlus with Liquibase Enterprise, you may encounter the error message below, referencing "Table: DATICAL_SPERRORLOG unacceptable due to an error."
Error Message:
Reason: liquibase.exception.UnexpectedLiquibaseException: Error executing command: Table: DATICAL_SPERRORLOG unacceptable due to an error.
Root Cause:
The DATICAL_SPERRORLOG table captures output for scripts executed using SQLPlus during a deployment. The Datical user creates the table. If the Datical user cannot "CREATE ANY table" and "DROP ANY table," the deployment will fail with the above error message.
Resolution:
Follow these steps to resolve this issue and prevent it from recurring:
- Verify the permissions for the Datical user and determine if you need to manually create the DATICAL_SPERRORLOG.
- Manually create the DATICAL_SPERRORLOG table, if needed.
- Repair the current state of the database by dropping the DATICAL_SPERRORLOG table and releasing the lock on the DATABASECHANGELOGLOCK table.
- You can now rerun your deployment.
Verify Permissions for the Datical User
The Datical user needs the following permissions:
- CREATE ANY table
- DROP ANY table
If the Datical user does not have these permissions, they will need to be granted, if possible.
If the Datical user cannot be granted permission to create and drop tables, you will need to manually create the DATICAL_SPERRORLOG table to resolve this moving forward.
Additional scenario:
If Liquibase Enterprise-created tables need to exist in a specific table space that is different from the default table space used to connect, you will need to create the DATICAL_SPERRORLOG manually.
Follow the steps below to manually create the DATICAL_SPERRORLOG table.
Manually Creating the DATICAL_SPERRORLOG Table
- Create the DATICAL_SPERRORLOG table in the tracking schema of the project.
Example SQL:CREATE TABLE DATICAL_TRACK.DATICAL_SPERRORLOG (
username VARCHAR(256),
timestamp TIMESTAMP,
script VARCHAR(256),
identifier VARCHAR(256),
message CLOB,
statement CLOB
) - Be sure to repeat step 1 on all environments (every step and/or db Def in the project).
Repair the Current State of the Database
Since the deployment failed, leaving the Liquibase tracking tables in an unexpected state, you will need to drop the existing DATICAL_SPERRORLOG table and remove the lock on the DATABASECHANGELOGLOCK table before proceeding with another deployment.
Comments
0 comments
Article is closed for comments.