If multiple instances are installed on an Oracle Server, which instance is connected when sqlplus/as sysdba is executed?
In fact, when sqlplus/as sysdba is executed, the user name and password can be entered at will, or as it is now blank without entering. In essence, the password file is not verified at this time, but comes in through the operating system. The SID of the connected database is determined by the operating system environment variable $ ORACLE_SID. The viewing method is echo V $ ORACLE_SID. this SID verification can be performed after sqlplus/as sysdba goes in, run the database command to view: select t. instance_name from v $ instance t.
For more detailed environment information of the database corresponding to this SID, you can view it in $ ORACLE_HOME/network/admin/tnsnames. ora.
When the sys user password of the Oracle database is forgotten, you can access the database through sqlplus/as sysdba, and then execute alter user sys identified by xxx to modify the sys user password.
For execution of sqlplus/as sysdba, the user must be in the DBA user group. For example, an oracle user can execute this command, while other common users report an error of insufficient permissions when executing this command.
For $ ORACLE_SID value Modification, add export ORACLE_SID = xxx to the. bash_profile file in bash shell mode, and then make the modification take effect: source. bash_profile. In this way, sqlplus/as sysdba connects to the $ ORACLE_SID value configured in the. bash_profile file.
Rlwrap
SQLPLUS spool to dynamic Log File Name
Oracle SQLPLUS prompt settings
Accelerate SQL return by setting SQLPLUS ARRAYSIZE (row prefetch)