Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LiquiBase: exec DBMS_UTILITY.compile_schema(schema => 'ECA', compile_all => false);

I'm using liquibase to execute oracle scripts. This oracle script, need to execute this function:

exec DBMS_UTILITY.compile_schema(schema => 'ECA', compile_all => false);

I saw that some people call this function using call statment instate of exec, and it works for me but with one parameter:

call DBMS_UTILITY.compile_schema(schema => 'ECA');

But if I add the second parameter:

call DBMS_UTILITY.compile_schema(schema => 'ECA', compile_all => false);

I get the following error:

call DBMS_UTILITY.compile_schema(schema => 'ECA', compile_all => false): ORA-06576: not a valid function or procedure name

Also I tried with exec:

exec DBMS_UTILITY.compile_schema(schema => 'ECA', compile_all => false);

And I get this error:

 Reason: liquibase.exception.DatabaseException: Error executing SQL exec DBMS_UTILITY.compile_schema(schema => 'ECA', compile_all => false): ORA-00900: invalid SQL statement

Althought if i execute in a sql console works fine.

Any idea about how to avoid this problem and be able to execute this function ?

Thanks in advance

like image 446
eballo Avatar asked Dec 05 '25 03:12

eballo


1 Answers

Try this:

<sql splitStatements="false">
begin
   DBMS_UTILITY.compile_schema(schema => 'ECA', compile_all => false);
end;
</sql>

Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!