Monday, January 19, 2026

What is SQLcl? And Why Aren’t You Using SQLcl?

What is SQLcl? And Why Aren’t You Using SQLcl?

1.  Downloading and Installing SQLcl:

Download and install Oracle SQL Developer Command Line (SQLcl) for free.
To download and install SQLcl:
Download SQLcl:
Go to the following page:
https://www.oracle.com/database/technologies/appdev/sqlcl.html
Click the Download button and follow the on-screen instructions.

Tip
To download the latest version using a direct link, 
go to https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-latest.zip
You can use this address to automate the download as part of an automated process.

2. To install SQLcl:

Select the ZIP file and extract the files.
A sqlcl folder appears. The SQLcl utility resides in the ./sqlcl/bin subdirectory 
and named as follows:

Microsoft Windows - sql.exe
MacOS,Linux, Unix – sql
 
[root@oraclelab1 patches]# su - oracle
Last login: Mon Jan 12 08:47:09 IST 2026 on pts/4
[oracle@oraclelab1 ~]$
[oracle@oraclelab1 ~]$ ps -ef|grep smon
oracle    5378  5324  0 19:03 pts/1    00:00:00 grep --color=auto smon
oracle   10285     1  0 Jan12 ?        00:00:14 ora_smon_DEVDB
[oracle@oraclelab1 ~]$
[oracle@oraclelab1 ~]$ cd /u01/patches/
[oracle@oraclelab1 patches]$
[oracle@oraclelab1 patches]$ ls -l sqlcl-25.4.0.346.1855.zip
-rw-r--r--. 1 oracle oinstall 101894185 Jan 19 18:57 sqlcl-25.4.0.346.1855.zip
[oracle@oraclelab1 patches]$
 
[oracle@oraclelab1 patches]$ cp sqlcl-25.4.0.346.1855.zip -d 
/u01/app/oracle/product/19.0.0.0/dbhome_1/
[oracle@oraclelab1 patches]$ cd /u01/app/oracle/product/19.0.0.0/dbhome_1/

[oracle@oraclelab1 dbhome_1]$ ls -l sqlcl-25.4.0.346.1855.zip
-rw-r--r--. 1 oracle oinstall 101894185 Jan 19 19:03 sqlcl-25.4.0.346.1855.zip
[oracle@oraclelab1 dbhome_1]$
 
[oracle@oraclelab1 dbhome_1]$ unzip sqlcl-25.4.0.346.1855.zip
Archive:  sqlcl-25.4.0.346.1855.zip
   creating: sqlcl/
   creating: sqlcl/bin/
   creating: sqlcl/lib/
..........<Truncated>.............
..........<Truncated>.............
..........<Truncated>.............
[oracle@oraclelab1 dbhome_1]$
 
[oracle@oraclelab1 dbhome_1]$ cd sqlcl/
[oracle@oraclelab1 sqlcl]$ ls -ltrh
total 20K
-rw-r-----. 1 oracle oinstall  348 Jan  1  2023 THIRD-PARTY-LICENSES.txt
-rw-r-----. 1 oracle oinstall  192 Jan  1  2023 NOTICES.txt
-rw-r-----. 1 oracle oinstall  216 Jan  1  2023 LICENSE.txt
drwxr-xr-x. 3 oracle oinstall 4.0K Jan  1  2023 lib
drwxr-xr-x. 2 oracle oinstall   75 Jan  1  2023 bin
-rw-r-----. 1 oracle oinstall   44 Jan  1  2023 25.4.0.346.1855
[oracle@oraclelab1 sqlcl]$ cd bin/
[oracle@oraclelab1 bin]$ ls -ltrh
total 220K
-rw-r-----. 1 oracle oinstall  152 Jan  1  2023 version.txt
-rwxr-xr-x. 1 oracle oinstall 176K Jan  1  2023 sql.exe
-rwxr-xr-x. 1 oracle oinstall  35K Jan  1  2023 sql
-rw-r-----. 1 oracle oinstall 3.8K Jan  1  2023 dependencies.txt
[oracle@oraclelab1 bin]$ pwd
/u01/app/oracle/product/19.0.0.0/dbhome_1/sqlcl/bin
[oracle@oraclelab1 bin]$
 
[oracle@oraclelab1 ~]$ which java
/bin/java
[oracle@oraclelab1 ~]$ /usr/bin/java -version
java version "11.0.28" 2025-07-15 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.28+12-LTS-279)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.28+12-LTS-279, mixed mode)
[oracle@oraclelab1 ~]$
 
[oracle@oraclelab1 ~]$ . oraenv
ORACLE_SID = [oracle] ? DEVDB
The Oracle base has been set to /u01/app/oracle
[oracle@oraclelab1 ~]$
[oracle@oraclelab1 ~]$ /u01/app/oracle/product/19.0.0.0/dbhome_1/sqlcl/bin/sql / nolog
 
Error: SQLcl requires Java 11 and above to run.
       Found Java version 8.
       Please set JAVA_HOME to appropriate version.
[oracle@oraclelab1 ~]$
 
[root@oraclelab1 patches]# ll jdk-11.0.28_linux-x64_bin.rpm
-rw-r--r--. 1 root root 168111450 Jan 19 19:18 jdk-11.0.28_linux-x64_bin.rpm
[root@oraclelab1 patches]#
 
[root@oraclelab1 patches]# rpm -ivh jdk-11.0.28_linux-x64_bin.rpm
warning: jdk-11.0.28_linux-x64_bin.rpm: Header V3 RSA/SHA256 Signature, key ID 8d8b756f: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:jdk-11-2000:11.0.28-12           ################################# [100%]
[root@oraclelab1 patches]#
 
[oracle@oraclelab1 ~]$ alternatives --display java
java - status is auto.
 slave jjs: /usr/lib/jvm/jdk-11.0.28-oracle-x64/bin/jjs
 slave keytool: /usr/lib/jvm/jdk-11.0.28-oracle-x64/bin/keytool
..........<Truncated>.............
..........<Truncated>.............
..........<Truncated>.............
[oracle@oraclelab1 ~]$
 
[oracle@oraclelab1 ~]$ export JAVA_HOME=/usr/lib/jvm/jdk-11.0.28-oracle-x64
[oracle@oraclelab1 ~]$ /u01/app/oracle/product/19.0.0.0/dbhome_1/sqlcl/bin/sql /nolog
 
SQLcl: Release 25.4 Production on Mon Jan 19 19:23:27 2026
 
Copyright (c) 1982, 2026, Oracle.  All rights reserved.
 
SQL> exit
[oracle@oraclelab1 ~]$
 
More details are here:
https://docs.oracle.com/en/database/oracle/apex/24.1/aeadm/downloading-and-installing-sqlcl.html
https://oracle-base.com/articles/misc/sqlcl-installation
 

3.  Advantages of sqlcl:

a.  alias function in SQLcl:
alias db = select DBID,NAME,LOG_MODE,OPEN_MODE,DATABASE_ROLE from v$database;
alias ins = select INSTANCE_NUMBER,INSTANCE_NAME,VERSION,EDITION,HOST_NAME,STATUS from v$instance;
b.  tab completion in SQLcl:
c.  beautifully formatted query result in SQLcl:
d.  Up-arrow for editing in SQLcl:


 

What is SQLcl? And Why Aren’t You Using SQLcl?

What is SQLcl? And Why Aren’t You Using SQLcl? 1.   Downloading and Installing SQLcl: Download and install Oracle SQL Developer Command Line...