SQLPlus when connections are typically three ways
1. sqlplus / as sysdba
Operating system authentication, the database server does not need to start listener, the database server does not need to be available. For example, we want to start the database can be used this way to enter the sqlplus, then started by startup command.
2. sqlplus username / password
Connect the machine database listener process does not require a database server, but due to the need to authenticate the user name and password, and therefore require a database server in a usable state job.
3. sqlplus usernaem / password @ orcl
Through a network connection, which is required for the database server listener in a listening state. This time to establish a connection roughly as follows:
a. query sqlnet.ora, look at ways to resolve the name, the default is TNSNAME
b. query tnsnames.ora file, from the inside looking orcl records, and find the host name of the database server or IP, port and service_name
c. If the server listener process is not a problem, the process of establishing a connection with the listener.
d. According to a different server models such as the dedicated server mode or shared server mode, listener goes on to take action. The default is dedicated server mode, there is no problem if the client to connect to the database server process.
e. At this connection has been established, you can operate the database.