Sqlplus usually have four ways of connecting
1.
?
Operating system authentication, does not require the database server to start listener, nor does it require the database server to be in a usable state. For example, if we want to start a database, we can enter it this way
Sqlplus, and then start with the startup command.
2.
?
1 |
sqlplus username/ password |
The listener process of the database server is not required to connect to the native database, but it requires the database server to be in a usable state because of the authentication of the user name password.
3.
?
1 |
sqlplus usernaem/ password @orcl |
Over a network connection, this is the listener that requires the database server to be in the listening state. The approximate steps to establish a connection at this time are as follows
A. Query Sqlnet.ora to see how names are parsed, by default Tnsname
B. Query the Tnsnames.ora file, find the ORCL record from the inside, and find the hostname or IP, port and service_name of the database server
C. If the server listener process is not a problem, establish a connection to the listener process.
D. Depending on the server mode, such as dedicated server mode or shared server mode, listener takes the next action. The default is dedicated server mode, no problem if the client
The server process on which the database is connected.
E. The connection is now established and the database can be manipulated.
4.
1 |
sqlplus username/ password @//host:port/sid |
Remotely connect Oracle commands with Sqlplus (example:
1 |
sqlplus risenet/[email protected]//192.168.130.99:1521/risenet |
)
Sqlplus usually have four ways of connecting