∟SQL*Plus - Oracle Command Line Interface

This section describes how to use Oracle command line interface, SQL*Plus.

Oracle XE server offers a command line interface called SQL*Plus. The program file of SQL*Plus is located at \local\orablexe\app\oracle\product\21c\bin\sqlplus.exe. "\local\orablexe\app\oracle\product\21c\bin" should be added to the %path% variable already by the Oracle XE installation process. If not, you can add it manually to avoid typing the full path to invoke the "sqlplus" command.

Here is what I did in a command window with "sqlplus", to obtain a list of all users and checking privileges of user "Herong":

herong> sqlplus /nolog

SQL*Plus: Release 21.0.0.0.0 - Production ...
Version 21.3.0.0.0

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

SQL> connect SYS/HerongY@ng AS SYSDBA
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified

SQL> connect SYS/anything AS SYSDBA
Connected.

SQL> SELECT USERNAME FROM ALL_USERS;

USERNAME 
------------------------- 
SYS 
AUDSYS 
SYSTEM 
SYSBACKUP 
SYSDG 
SYSKM 
SYSRAC 
OUTLN 
GSMADMIN_INTERNAL 
GSMUSER 
GSMROOTUSER 
 
USERNAME 
------------------------- 
DIP 
XS$NULL 
REMOTE_SCHEDULER_AGENT 
DBSFWUSER 
...

37 rows selected.

This tutorial shows a number of interesting behaviors of Oracle server:

Table of Contents

 About This Book

 JDBC (Java Database Connectivity) Introduction

 JDK (Java SE) Installation

►Oracle Express Edition Installation on Windows

 Oracle Database Express Edition (XE) Installation

 Accessing Oracle Server through Web Interface

 Creating Oracle Database Users

►SQL*Plus - Oracle Command Line Interface

 SQL*Plus - Create New User and Login

 Oracle JDBC Drivers

 Oracle - Reference Implementation of JdbcRowSet

 Oracle - PreparedStatement

 Oracle - JBDC CallableStatement

 Oracle CLOB (Character Large Object) - TEXT

 Oracle BLOB (Binary Large Object) - BLOB

 Using Connection Pool with JDBC

 Archived Tutorials

 References

 Full Version in PDF/EPUB