Oracle provides two administrator verification methods: operating system verification and password file verification, connecting to the database, and performing management tasks.
When an Oracle database is created, two users sys and system are automatically created. The default passwords are change_on_install and manager. If you want to execute a management task, we recommend that you create a user with DBA permissions. the DBA role is automatically created when oracle is created. This role can be used to manage all databases.
1. Operating System verification
Oracle can check the operating system permissions. If it passes, it can connect to the database. To pass the verification, if you are in a UNIX operating system, you must be a member of the osdba or osoper operating system group. These two groups are managed by the operating system.
To use the operating system verification method, you must set the remote_login_passwordfile parameter to none.
When you run Conn/As sysdba or Conn/As sysoper to connect to the database, you no longer need the database.
2. Password File Verification
When the password file is verified, you must specify a user and password to connect to the database. In this case, you must have certain permissions in the database.
To verify the password file, perform the following operations:
(1) Use orapwd to create a password file with the Sys password. When the password is changed in the database, the password in the password file will also be changed automatically.
(2) set the remote_login_passwordfile parameter.
Exclusive (exclusive): the password file can be used only for one database, and users other than sys and system can be added to the password file.
Shared: the password file can be shared among multiple databases, but you cannot add any user except sys and system to the password file.
(3) grant the user sysdba or sysoper permissions. When the above permissions are granted, the user will be added to the password file.
Test Question:
If you want to connect to the database only by using a password file, create a password file using the following method:
$ Orapwd file = $ ORACLE_HOME/dbs/orapwdb01 Password = orapass entries = 5
The initialization parameter remote_login_passwordfile is set to none,
Create a user using the following method:
Create user dba_user identified by dba_pass;
Grant sysdba to dba_user;
Use the following method to connect to the database:
Connect dba_user/dba_pass as sysdba;
Why does the connection fail?
A dba privilege is not granted to dba_user;
B remote_login_passwordfile is not set to exclusive;
The C password file is created in an incorrect directory.
D. When you connect to the database as sysdba, the password orapass is not specified;
Answer: The reason for B is as follows.