Skip to Main Content

SQLcl

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

CI/CD Shell script with SQLcl

I have worked all day to be able to use SQLcl in shell scripts intended for CI/CD tools. My goal is to import/export Apex applications.

Right now these examples seems to fit my need :

  • Project directories
project/
	build-tools/
		sqlcl/
			bin/
			lib/
			...
		sqlclscripts/
			run.sh
			test.sqlcl
			apexexport.sqlcl
			apeximport.sqlcl
			...
	src/
		apex/
			app.sql
	dev.env
  • run.sh : Script that receive another script as an argument
#!/bin/bash 
RUNSCRIPT=$1
../sqlcl/bin/sql -s -L USER/PWD@server:9999/DBNAME <<EOF
$(cat $RUNSCRIPT.sqlcl) 
EOF
  • To run the a script :
./run.sh apexexport

With this I can create almost anything using Javascript to run from my CI/CD runner.

Anyone have better ideas doing this? If not, I hope it can help someone!

This post has been answered by Alexandre Courchesne on Feb 20 2025
Jump to Answer

Comments

BluShadow Mar 18 2024

Oracle support documents are available to paying customers through the support portal: support.oracle.com

If you are not a paying customer then I'm afraid you won't have access to the document, and it is a breach of any customer's agreement with Oracle to supply such support documents to others.

1 - 1

Post Details

Added on Feb 12 2025
8 comments
157 views