Wednesday, January 21, 2026

Oracle Live SQL | How or Where to practice SQL hands-on?

Oracle Live SQL

Oracle Live SQL
https://freesql.com/

Learn and share SQL. Oracle Database 23ai. Live SQL Classic. Oracle Database 19c. Start Coding · View Scripts and Tutorials. Featured Scripts and Tutorials.

Oracle Live SQL | How or Where to practice SQL hands-on? 

How to connect to database using sqldeveloper?

How to connect to database using sqldeveloper?

YouTube link for the demonstration 
https://youtu.be/AxM3oh958jk

Steps:
+++++++

a. Make sure your are able to access the oracle server from your laptop / Desktop via any terminal software (Like putty or MobaXterm etc...)


b. Make sure that Oracle Database and Listeners are up and running on the Oracle server 

- Validate that database has registered with listener 

c. Make sure you have installed sqldeveloper software on your laptop / Desktop 

Note:
Download the latest Oracle SQL developer from the below Oracle URL
https://www.oracle.com/in/database/sqldeveloper/technologies/download/

- Try connection with connection details like hostname/IP address, Port and Service Name
- Try connection with TNS entries from sqldeveloper software
- Try connection with TNS entries from client software

Note:
Download Oracle 19 client from the below Oracle URL
https://www.oracle.com/in/database/technologies/oracle19c-windows-downloads.html

lab Output:
+++++++++++

Microsoft Windows [Version 10.0.26200.7623]
(c) Microsoft Corporation. All rights reserved.

C:\Users\MallikarjunRamadurg>ping oraclelab1.localdomain.com

Pinging oraclelab1.localdomain.com [10.1.51.128] with 32 bytes of data:
Reply from 10.1.51.128: bytes=32 time=252ms TTL=61
Reply from 10.1.51.128: bytes=32 time=249ms TTL=61

Ping statistics for 10.1.51.128:
    Packets: Sent = 2, Received = 2, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 249ms, Maximum = 252ms, Average = 250ms
Control-C
^C
C:\Users\MallikarjunRamadurg>ping 10.1.51.128

Pinging 10.1.51.128 with 32 bytes of data:
Reply from 10.1.51.128: bytes=32 time=250ms TTL=61
Reply from 10.1.51.128: bytes=32 time=251ms TTL=61

Ping statistics for 10.1.51.128:
    Packets: Sent = 2, Received = 2, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 250ms, Maximum = 251ms, Average = 250ms
Control-C
^C
C:\Users\MallikarjunRamadurg>

[root@oraclelab1 ~]# clear
[root@oraclelab1 ~]# hostname
oraclelab1.localdomain.com
[root@oraclelab1 ~]# ps -ef|grep smon
oracle   10285     1  0 Jan12 ?        00:00:16 ora_smon_DEVDB
root     27536 25205  0 02:36 pts/1    00:00:00 grep --color=auto smon
[root@oraclelab1 ~]# su - oracle
Last login: Mon Jan 19 23:08:36 IST 2026 on pts/2
[oracle@oraclelab1 ~]$ . oraenv
ORACLE_SID = [oracle] ? DEVDB
The Oracle base has been set to /u01/app/oracle
[oracle@oraclelab1 ~]$
[oracle@oraclelab1 ~]$ env |grep ORA
ORACLE_SID=DEVDB
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/19.0.0.0/dbhome_1
[oracle@oraclelab1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Wed Jan 21 02:37:32 2026
Version 19.17.0.0.0

Copyright (c) 1982, 2022, Oracle.  All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.17.0.0.0

SQL> select name, open_mode from v$database;

NAME      OPEN_MODE
--------- --------------------
DEVDB     READ WRITE

SQL> select instance_name, status from v$instance;

INSTANCE_NAME    STATUS
---------------- ------------
DEVDB            OPEN

SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.17.0.0.0
[oracle@oraclelab1 ~]$ ps -ef|grep tns
root        23     2  0  2025 ?        00:00:00 [netns]
oracle   27677 27564  0 02:38 pts/1    00:00:00 grep --color=auto tns
oracle   32171     1  0 Jan05 ?        00:00:20 /u01/app/oracle/product/19.0.0.0/dbhome_1/bin/tnslsnr LISTENER -inherit
[oracle@oraclelab1 ~]$ lsnrctl status LISTENER

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 21-JAN-2026 02:38:23

Copyright (c) 1991, 2022, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oraclelab1.localdomain.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date                05-JAN-2026 09:32:21
Uptime                    15 days 17 hr. 6 min. 2 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/19.0.0.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/oraclelab1/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oraclelab1.localdomain.com)(PORT=1521)))
Services Summary...
Service "DEVDB" has 1 instance(s).
  Instance "DEVDB", status READY, has 1 handler(s) for this service...
Service "DEVDBXDB" has 1 instance(s).
  Instance "DEVDB", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@oraclelab1 ~]$
[oracle@oraclelab1 ~]$
[oracle@oraclelab1 ~]$ cd /u01/app/oracle/product/19.0.0.0/dbhome_1/network/admin/
[oracle@oraclelab1 admin]$
[oracle@oraclelab1 admin]$ cat tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/19.0.0.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

DEVCDB =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = oraclelab1.localdomain.com)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = DEVCDB)
    )
  )

DEVPDB =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = oraclelab1.localdomain.com)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = DEVPDB)
    )
  )

DEVDB =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = oraclelab1.localdomain.com)(PORT = 1521))
    (CONNECT_DATA =
      (SERVICE_NAME = DEVDB)
    )
  )

TESTCDB =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = oraclelab1.localdomain.com)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = TESTCDB)
    )
  )

TEST =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = oraclelab1.localdomain.com)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = TEST)
    )
  )

[oracle@oraclelab1 admin]$ tnsping DEVDB

TNS Ping Utility for Linux: Version 19.0.0.0.0 - Production on 21-JAN-2026 02:39:05

Copyright (c) 1997, 2022, Oracle.  All rights reserved.

Used parameter files:


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = oraclelab1.localdomain.com)(PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME = DEVDB)))
OK (0 msec)
[oracle@oraclelab1 admin]$
[oracle@oraclelab1 admin]$
[oracle@oraclelab1 admin]$ sqlplus mallik/mallik@DEVDB

SQL*Plus: Release 19.0.0.0.0 - Production on Wed Jan 21 02:39:27 2026
Version 19.17.0.0.0

Copyright (c) 1982, 2022, Oracle.  All rights reserved.

Last Successful login time: Wed Jan 21 2026 02:23:02 +05:30

Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.17.0.0.0

SQL> show user
USER is "MALLIK"
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.17.0.0.0
[oracle@oraclelab1 admin]$
[oracle@oraclelab1 admin]$ sqlplus sys/Mallik123#@DEVDB as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Wed Jan 21 02:39:54 2026
Version 19.17.0.0.0

Copyright (c) 1982, 2022, Oracle.  All rights reserved.

Last Successful login time: Tue Jan 20 2026 20:23:27 +05:30

Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.17.0.0.0

SQL> show user
USER is "SYS"
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.17.0.0.0
[oracle@oraclelab1 admin]$


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:


 

Oracle_AI_Database_26ai_Free_Installation_(formerly Express Edition XE)

Oracle_AI_Database_26ai_Free_Installation_(formerly Express Edition XE) Installing Oracle AI Database 26ai Free (formerly Express Edition/XE...