Oracle server-side operations are generally as follows:
1) Installing Oracle Server Software
2) Create database (automatically created at installation)
3) Configure monitoring (automatic configuration at installation)
4) Start Oracle Instance
5) Create user table space
6) Create a new user and authorize
Let 's start by creating a user table space, creating a new user, and authorizing two items:
First use the system administrator to log in to Oracle (Sqlplus/as SYSDBA)
? Create user tablespace (d packing directory to create a tablespace named Ts_zhangsan)
Create tablespace ts_zhangsandatafile' D:\zhangsan.dbf 'size30mautoextend on ;
? Create user (user named Zhangsan password is pwd)
Create user Zhangsan identified by PWD;
? Grant Tablespace Ts_zhangsan to user Zhangsan
Alter user Zhangsan default Tablespace ts_zhangsan;
? Grant user Zhangsan permissions to connect to the database, create tables, views, manipulate space, and more
Grant Create Session,create table,create view,unlimited tablespace to Zhangsan;
? User Zhangsan Connect to Oracle
Conn Zhangsan/pwd
Note:
? you must authorize the create session before you can connect to Oracle
? Then you have to authorize tablespace to create the activity
? You then authorize CREATE table to create a table (view same)
? If authorized for all users, use to public, such as:
Grant Create session to public
? Reclaim permissions with revoke from, such as (reverse order and authorization)
Revoke CREATE table from Zhangsan;
Revoke create session from Zhangsan;
? If the user has a table below, it is not possible to delete (drop) directly, unless you add cascade after the DELETE statement to force the deletion so that all user-related things are deleted naturally: