1

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

3
  • These are the way to connect to database. there is not certain reason except password or security hole. :) Commented Oct 11, 2020 at 15:29
  • Why not just connecting using "sqlplus sys as sysdba" then right the password when prompted? Commented Oct 11, 2020 at 16:06
  • 1
    As you said, both work equally well and are in effect identical. The author seems prefer, as a matter of choice, the way he wrote it. If had written it they way you prefer, you can be certain someone, somewhere, would be asking why he didn't specify 'sqlplus /nolog' followed by 'connect sys as sysdba'. When writing docs like that its easier to just specify "a" sequence of commands and not get twisted up explaining all the possible variations. Commented Oct 11, 2020 at 16:44

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

I did not mean to enter the password explicitly, I am just saying it can be replaced with "sqlplus sys as sysdba" then user will be asked to enter the password. What is the difference then?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.