Understanding connecting to the database through SQLPLUS

328 views Asked by At

when reading the Oracle APEX documentation, I did not understand the reason it asks to connect to the database through sqlplus using sqlplus /nolog then connect sys as sysdba. If it will eventually connect with sys as sysdba, why not doing it from the beginning with sqlplus sys as sysdba command? Here is what I am talking about: https://docs.oracle.com/en/database/oracle/application-express/20.1/htmig/downloading-installing-Oracle-AE.html#GUID-7E432C6D-CECC-4977-B183-3C654380F7BF

1

There are 1 answers

1
Connor McDonald On

I would suspect its historical. In older releases on SQL Plus, if you ran:

sqlplus my_user/my_pass 

on the command line, then on unix environments someone running the 'ps' command could see those details. Even in modern versions of SQL Plus where we remove that from obvious view, then digging into things like command history could expose it.

So always best never to type user or password details on the command line.