0002 Oracle account-related statements, 0002 oracle
After the Oracle installation is complete, find SQL Plus in "start" and run it. Enter the account and password and use system/password to connect.
1. Oracle has a default scott account password tiger, which is used for connection:
CONN username/password; eg: CONN scott/tiger;
2. scott's account is locked by default and needs to be unlocked:
Alter user Username account unlock; eg: alter user scott account unlock;
3. the default password of scott's account is tiger. You can change the password:
Alter user Username identified by new password; eg: alter user scott identified by 123;
4. display the user name for the current connection:
Show user; eg: show user;
5. Create a new user jonh with a password of 123. Be sure to connect AS sysdba and add "as sysdba" after the CONN statement.
Create user Username identified by password; eg: create user john identified by 123;
6. Authorize the newly created user:
GRANT permission name,..., permission name TO user name; eg: grant connect to john;
7. Cancel user authorization:
REVOKE permission name,..., permission name FROM user name; eg: revoke connect from john;
8. delete a user:
Drop user Username; eg: drop user john;