Skip to Main Content



For appeals, questions and feedback, please email

%USER_NAME% token in liquibase generated sql files

Sveinn H ZoegaFeb 28 2024

I am using Oracle SQLDeveloper Command-Line (SQLcl) version: build:

I have used liquibase generate-schema -split -sql to generate xml and sql files for my db schema. The plan is to better version control the database objects and code and implement ci/cd pipelines for my team's databases.

I am aware that probably liquibase is the best way forward to update database objects and implements build pipelines.

As a first step I want to use the sql files (not liquibase xml files) to manually update object database code but in a structured way through git.

Now all sql files use a %USER_NAME% token in the script (eg. CREATE OR REPLACE EDITIONABLE TRIGGER "%USER_NAME%"."MY_TRIGGER").

I see this was added in the most recent version: SQLcl Release Notes 23.4.0 (

I haven't found a way to execute these sql scripts directly using sqlcl, I get a ORA-01031: insufficient privileges error as the database doesn't allow me to create object in the non-existent %USER_NAME% domain.

Is there a way to make sqlcl substitute %USER_NAME% with a environment variable or command line argument ?

Post Details
Added on Feb 28 2024
1 comment