Oracle Account Management

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.