But not working when I tried to combine then together (looks some issue with delimiter), getting error as ORA-00911: invalid character
Please guide & help.
Thanks!
ERROR:
[2022-05-25 15:15:02] SEVERE [liquibase.integration] ORA-00911: invalid character
liquibase.exception.CommandExecutionException: liquibase.exception.LiquibaseException: Unexpected error running Liquibase: Migration failed for change set db/sql/execute_proc_create_table-2849.xml::Combined_sql::ABC XYZ:
Reason: liquibase.exception.DatabaseException: ORA-00911: invalid character
[Failed SQL: (911) CREATE TABLE TEST_TABLE
(
KEY_ID VARCHAR2(200 BYTE)
, MODEL_ID VARCHAR2(40 BYTE)
, FNAME VARCHAR2(20 BYTE)
, LNAME VARCHAR2(40 BYTE)
);]
at liquibase.command.CommandScope.execute(CommandScope.java:163)
at liquibase.integration.commandline.CommandRunner.call(CommandRunner.java:51)
at liquibase.integration.commandline.CommandRunner.call(CommandRunner.java:21)
at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
at picocli.CommandLine.access$1300(CommandLine.java:145)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2352)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2346)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2311)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
at picocli.CommandLine.execute(CommandLine.java:2078)
at liquibase.integration.commandline.LiquibaseCommandLine.lambda$execute$1(LiquibaseCommandLine.java:325)
at liquibase.Scope.child(Scope.java:189)
at liquibase.Scope.child(Scope.java:165)
at liquibase.integration.commandline.LiquibaseCommandLine.execute(LiquibaseCommandLine.java:291)
at liquibase.integration.commandline.LiquibaseCommandLine.main(LiquibaseCommandLine.java:80)
Once you defined “/” as enddelimiter for the sqlfile you cannot use a semicolon to end any sql statements.
Your create table statement is still using semicolon as the delimiter, plus then you added the “/”. You cannot use semicolons for any SQL statements in that sqlfile.
Note: PL/SQL and SQL are treated differently by Oracle when it comes to end delimiters. PL/SQL will contain many semicolons, but the entire block is one statement, so it ends with a “/”.
That being said, I would not recommend combining these into one changeset. Each DDL should be in it’s own changeset since DDL is not transactional in Oracle.