Oracle Study Notes: sqlplus User Logon
1 sqlplus Login
Local login (log on to the database server)
Oracle Logon
Sqlplus account name/password as role name
1.1 sys Login
Example: sqlplus sys/oracle
ERROR:
ORA-28009: connection as SYS shocould be as SYSDBA or SYSOPER
The sys administrator must have the sysdba role.
[Oracle @ yutianedu ~] $ Sqlplus sys/oracle as sysdba
Execute show user;
SQL> show user; displays the current Login user
USER is "SYS"
Exit
1.2 system Logon
Sqlplus system/oracle
1.3 scott login (representative of common Users)
By default, normal users are locked and cannot log on.
You can use the Administrator to unlock and the administrator can reset the password.
1.3.1 Administrator Logon
Sqlplus sys/oracle as sysdba
1.3.2 unlock and reset the password
Alter user scott account unlock; unlock
Alter user scott identified by oracle; Set scott's password to oracle
1.3.3 scott Login
Sqlpous scott/oracle
Question 1: Is it possible that one server has multiple databases?
Which one does sqlplus sys/oracle as sysdba log on ??????
When you log on, you will check the environment variable ORACLE_SID to indicate which instance you are logged on.
How to view the value of an environment variable currently in effect
[Oracle @ yutianedu ~] $ Env | grep ORACLE_SID
If you do not specify the default logon, it should be an orcl instance.
Summary: templates for local logon in the future
Install Oracle 11gR2 (x64) in CentOS 6.4)
Steps for installing Oracle 11gR2 in vmwarevm
Install Oracle 11g XE R2 In Debian
First define the instance you want to log on ---> export ORACLE_SID = orcl
Then log on to ---> sqlplus sys/oracle as sysdba
Question 2: Did I enter the password at login and who will verify the password?
Sys is the operating system verification and database is irrelevant
You can log on to the database no matter whether the database is started or not.
What IS OS verification? First, log on to the operating system. Then, if you have the permission to log on, the password is not verified.
Oracle logon --- oracle belongs to the dba group ---- You have sysdba Permissions
Sqlplus/as sysdba; Password Authentication Not Required
SQL> show user;
USER is "SYS"
Common users use data dictionary verification.
A data dictionary is a table in a database that stores account and password information.
If the database is not started to the open state, it is not allowed to read the database of tables in the database.
If a common user logs on, the database must be in the open
For more details, please continue to read the highlights on the next page: