views:

97

answers:

1

I have a number of Oracle triggers stored in a file which we upload to our DB using sqlplus. We want to use liquibase instead to manage this, but I don't really want to split out the triggers into separate files. The file looks like:

  create or replace trigger Trig1 ...
  ...
  end Trig1;
  /
  create or replace trigger Trig2 ...
  ...
  end Trig2;
  /
  ...etc.

I've tried

<sqlFile splitStatements="true" endDelimiter="/" path="triggers.sql">

but it still seems to be trying to split on ';'. If I change splitStatements to false. it then ignores the '/' and includes everything as an invalid single trigger. Any ideas?

TIA.

A: 

That syntax looks correct. The endDelimiter should be telling it to override the default ; delimiter and use / instead. What version of liquibase are you using? Does it help if you put the \ not by itself?

  create or replace trigger Trig1 ...
  ...
  end Trig1; /

  create or replace trigger Trig2 ...
  ...
  end Trig2; /

  ...etc.
Nathan Voxland