1. Oracle has two ways to connect to the database: local or remote. When logging on to the database server, setting Oracle_SID, and no longer connecting to the database specified in $ sqlplussystem,
1. Oracle has two ways to connect to the database: local or remote. When logging on to the database server, setting Oracle_SID, and no longer connecting to the database specified in $ sqlplus system,
1. Oracle has two ways to connect to the database: local or remote.
When you log on to the database server, set Oracle_SID, and no longer connect to the database specified in $ sqlplus system in the string, use a local connection.
The local connection uses the bequeath protocol and does not need to run listener.
This is a typical method for most DBAs to connect to the database, because DBAs have logged on to the Unix server remotely or Xwindows.
For example:
SQL> sqlplus/nolog
SQL> conn/as sysdba;
Connnected to a idle instance // This message is displayed, indicating that the database has not been started.
SQL> startup
// At this point, we can not use the SID connection, if you want to use this form
SQL> conn sys/sys_Oracle @ orcl as sysdba;
The no listener error occurs.
The listener must be started first!
2. Modify the error when writing SQL statements, that is, specify the editor during ed.
First, create a login. SQL file.
For example:
My path is/opt/app/Oracle/admin/orcl/create/login. SQL.
Add the following to login. SQL:
DEFINE _ edit = vi (the editor you want to use) (Note: Not define_edit, but define _ edit; this problem puzzles me for one night)
Then we can add this sentence to. bash_profile in the Oracle user's home directory.
SQLPATH =/opt/app/Oracle/admin/orcl/create
OK. In this way, sqlplus can load the login. SQL content each time it starts.
The vi is opened and can be edited.