Oracle: A process for creating a user, creating a tablespace, authorizing

Source: Internet
Author: User

1. First we can log in to Oracle as SYSDBA as a Scott user.

Conn Scott/ as Sysdba   

2. Then I'll be able to create the user.

Create User  by 123;   

3. Create a good user we can then modify the user's password.

Alter User  by Chen;   


4. By default, the user is assigned a table space (users) by default when created.
We can use the following SQL statement to look at the tablespace where all the users are located.

Select  from Dba_users;   

5. Generally in the development situation, we certainly do not use the user's default table space, so we need to create a table space.

Create ' h:\oracle\ts_cy\cy_data.dbf ' size 200M;   


Note: The datafile is followed by the physical storage path of the tablespace, where the storage path exists

6. Create a table space, and you need to assign the tablespace to the user.

Alter User default tablespace ts_cy;   

7. We can query the table space where the user is located through step 4来.

8. The user is assigned a tablespace, the user is not logged in (no login permission), so you also need to assign permissions to the user

Grant  Create session,createtable,createview,create to Cy ;   

Note:UNLIMITED tablespace permissions, that is, the user can create tables in other table spaces.

9. After assigning permissions to the user, we can log in with the ZZG user.

Conn Cy/chen;
10. We can also check the user's privileges after login
Select *  from Session_privs;   

11. Finally, we can also delete users and their related objects

Drop User Cascade;

Oracle: A process for creating a user, creating a tablespace, authorizing

Related Article

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.