Quantcast
Channel: Liquibase Forums
Viewing all articles
Browse latest Browse all 2993

Liquibase vs SQLPLUS for SPOOL output.

$
0
0
Hello,

I am currently migrate from oracle sqlplus standard usage to liquibase. But during this migration, my '.sql' file have some declaration off spool file and liquibase don't like them:

I did a simple test sql file like

SQL\03.05\57878\pa_ng_123389_BBA_001_rtg_57878.sql

SPOOL my_spool.txt
select sysdate from DUAL;
SPOOL off


without success :(.

Error message
SEVERE 18/01/17 09:11: liquibase: SQL/03.05/57878/afpl_db_changelog_57878.xml::5
7878::rtg: ORA-00900: instruction SQL non valide
 [Failed SQL: SPOOL my_spool.txt
select sysdate from DUAL]
liquibase.exception.MigrationFailedException: Migration failed for change set SQ
L/03.05/57878/afpl_db_changelog_57878.xml::57878::rtg:
     Reason: liquibase.exception.DatabaseException: ORA-00900: instruction SQL n
on valide
 [Failed SQL: SPOOL my_spool.txt
select sysdate from DUAL]
        at liquibase.changelog.ChangeSet.execute(ChangeSet.java:619)
        at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:51
)


Some one can help me ?

If spool is not available with liquibase, maybe the option '--logLevel' can help me to have sql execution output ?

My liquibase commande is:
java -jar liquibase.jar \
      --driver=oracle.jdbc.OracleDriver \
      --changeLogFile=SQL/03.05/57878/afpl_db_changelog_57878.xml \
      --url="jdbc:oracle:thin:@plvuatdb01:1522:PLVH03" \
      --classpath=ojdbc6.jar \
      --username=xxx\
      --password=xxx\
       --logLevel=info \
      update

SQL/03.05/57878/afpl_db_changelog_57878.xml
<databaseChangeLog
 
  <changeSet id="57878" author="rtg" dbms="oracle" runAlways="false" failOnError="true" runOnChange="false" context="standard">
    <sqlFile path="SQL\03.05\57878\pa_ng_123389_BBA_001_rtg_57878.sql" stripComments="true" splitStatements="true" />
  </changeSet>

</databaseChangeLog>



Regards,



Viewing all articles
Browse latest Browse all 2993

Trending Articles