1

There are several insert sql statements which have \ in them. Originally the statements were written for manual execution from sql developer. So SET ESCAPE ; would work and the insert scripts also would be inserting the values as per expectations. While migrating to liquibase to automate the execution of sql statements the statement set escape \ is giving error in liquibase.

Have tried multiple ways to execute but nothing is working.

jarlh
  • 42,561
  • 8
  • 45
  • 63
Harsh
  • 11
  • 1

1 Answers1

1

SET ESCAPE is a client-side directive specifically for SQL Plus. There are two options when using Liquibase:

  1. With Liquibase Open Source, you probably don't need to include the SET ESCAPE directive at all, because Liquibase doesn't require the same escaping that SQL Plus does.

  2. With Liquibase Pro, you could use runWith to specifically use SQL Plus native executor on an Oracle database. You can see more about that here: https://docs.liquibase.com/concepts/changelogs/attributes/use-sql-plus-integration.html

  • Thanks for the response. We are currently migrating to Liquibase. As earlier it was executed in the SQL Developer interface. So, while migrating we want to make minimal changes and keep both native and liquibase scripts in sync and not different for different. If there is any other way possible it would be highly beneficial. Thanks – Harsh May 19 '23 at 17:55