1. query user information
SQL> select username, default_tablespace, temporary_tablespace, created, account_status from dba_users;
2. Add users
1.% su-Oracle, or log in with an oracle software installation user
2. Change the ORACLE_SID environment variable to add the user's database name
3. SQL> connect/as sysdba
4. SQL> create user user_name identified by user_passwd
Default tablespace default_tablespace
Temporary tablespace temp_tablespace
Quota unlimited on default_tablespace;
Usern_ame is created. The password is user_password. Select the default tablespace and temporary tablespace. Generally, the default tablespace is created by yourself. The USERS tablespace is the worst case, and the temporary tablespace is TEMP.
5. SQL> grant connect, resource to user_name;, assign permissions to user_name
Verification:
Use the created user to log on and verify the Chinese character. If yes, the user is created successfully.
3. Change User Password
1. Log On As an oracle user.
2.% sqlplus/nolog
SQL> connect/as sysdba
SQL> alter user USER_NAME identified by USER_PASSWD;
Verification:
Use this user and the modified password to log on. After Successful Logon, the password is successfully modified.
4. delete a user
When a user is deleted, the user and its related modes are deleted from the data dictionary. If any Mode object is included in the mode, the user is deleted immediately. use the cascade option to delete the user, all related objects, and foreign keys dependent on the user:
1. Log On As an oracle user.
2.% sqlplus/nolog
SQL> connect/as sysdba
SQL> drop user user_name cascade;
Verification:
The user is successfully logged on with the user before deletion. After deletion, use the user's login for verification. If the user fails, the deletion is successful or the user has been locked.
Alternatively, you can use SQL> select username from dba_users where username = 'capitalized deleted username 'to query records.