Here is what i tried:
- <changeSet id="2016-08-25-cn" author="user1">
- <comment>
- Testing retry logic on liquibase
- </comment>
- <sql>splitStatements='true'>CALL RETRY-TRANS-EXCEPTION();</sql>
- </changeSet>
- </databaseChangeLog>
and the sql file:
- CREATE OR REPLACE PROCEDURE RETRY-TRANS-EXCEPTION
- AS
- v_query varchar2(100);
- BEGIN
- FOR i IN 1..5 LOOP
- DBMS_OUTPUT.PUT('Try #' || i);
- v_query := 'ALTER TABLE CIS_CASE ADD TEST01 varchar2(1) NOT NULL' ;
- execute immediate v_query;
- END loop;
- END;
- /
Error on running liquibase update
liquibase update Failed: Migration failed for change set changelog.xml::2016-08-25-cnwillia-01::user1: Reason: liquibase.exception.DatabaseException: Error executing SQL splitStatements='true'>CALL RETRY-TRANS-EXCEPTION(): ORA-00900: invalid SQL statement