SQL*Plus is Oracle Database’s classic command-line client for connecting, running SQL/PLSQL, and simple administration. For a more modern CLI with scripting niceties, consider SQLcl. (The browser-based iSQL*Plus is discontinued.)
//host:port/service) or a TNS aliassqlplus scott@//localhost:1521/orclpdb1
-- then enter password when prompted
sqlplus scott@orcl
sqlplus /nolog
CONNECT scott@//localhost:1521/orclpdb1
sqlplus / AS SYSDBA
sqlnet.ora / tnsnames.ora (or Easy Connect Plus parameters). They are
not passed as extra tokens on the CONNECT command.
DESCRIBE hr.employees;
SELECT first_name, last_name, department_id
FROM hr.employees
FETCH FIRST 5 ROWS ONLY;
SPOOL /tmp/emp_report.txt
COLUMN full_name FORMAT A30
SELECT first_name || ' ' || last_name AS full_name FROM hr.employees FETCH FIRST 10 ROWS ONLY;
SPOOL OFF
SQL*Plus works with either Shared or Dedicated server modes, but you don’t “turn on shared server”
in the CONNECT command. Shared/Dedicated is a database configuration (dispatchers,
shared servers, service handlers). If the database offers a Shared Server service, your normal
connect string will use it.
Server Manager (svrmgrl) was retired long ago and its CLI functions were consolidated into SQL*Plus. For fleet monitoring and automation, use Enterprise Manager Cloud Control.