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