Hello there ,
My Name is Ricardo I'm a database administrator . I have been using liquibase on the past for many many year on a couple of my positions with different wrappers .
In my current job, we are evaluating the usage of liquibase making use of SQLcl . In the process I'm trying to cover all the requirements from our analyst developers and make sure that we can move forward .
They had basically 3 concerns
- management of the character “&” within our string, aka set define. we have seen that within the context of sqlcl when we run liquibase command it is smart enough to know that we are not in a interactive session and process each of our script like we had specify set define off.
( Check - we are good to go there )
- management of the encoding , our database is using cp1252 and in the past we had to make sure of two things prior running deployements script one that we set encoding cp1252 + that all the scripts that we about to be excuted are encoded as 1252 as well otherwise we encountered all kind of issues. within the context of sqlcl when we run liquibase command if the scripts are encoded in utf8 then there is magic going on but everything gets to the database correctly all the accents and special character treated as they should
( Check - we are good to go there )
- managemet of dbms_output aka set serverouput on. within our scripts we have sometimes messages that are outputed and we need to keep those in the context of deployement log. within the context of sqlcl when we run liquibase command if prior execution of the script we execute the set serveroutput on , we ended with exactly what we need . With the version 24.1.1 that is ; with latest version no output at all are returned
( Problem with latest version / regression )
LIQUIBASE_POC@jdbc:oracle:thin:@corpdeve SQL>version
Oracle SQLDeveloper Command-Line (SQLcl) version: 24.1.1.0 build: 24.1.1.120.0826
LIQUIBASE_POC@jdbc:oracle:thin:@corpdeve SQL>lb up -chf "./changelog-master.xml"
--Starting Liquibase at 2024-11-15T10:00:51.227452400 (version 4.25.0 #3966 built at 2023-11-10 23:07:29 UTC)
Running Changeset: 20241112-test-encoding-define/dbms-out.sql::dbms-out::ricardo
UPDATE SUMMARY
Run: 1
Previously run: 5
Filtered out: 0
-------------------------------
Total change sets: 6
Liquibase: Update has been successful. Rows affected: 1
Operation completed successfully.
Ricardo - this is an dbms_output.put_line test ...
LIQUIBASE_POC@jdbc:oracle:thin:@corpdeve SQL>
I'm sure you will be able to reproduce easily ; providind here just for reference the sql changeset we are using to test this behavior :
-- liquibase formatted sql
--changeset ricardo:dbms-out splitStatements:false endDelimiter:/
--validCheckSum: 9:fc7b3180388c7f48e9df4dd1ed8cbbd2
begin
dbms_output.put_line('Ricardo - this is an dbms_output.put_line test ...');
end;
/
--rollback empty;
thanks in advance for the support.
have a good day.
Ricardo Da Fonseca