Table Space Definition
Table spaces are specifically built to unify the physical and logical structure of Oracle, and physically,
A tablespace is made up of data files on one or more disks (at least 1 to 1, which can be 1 pairs
more), logically a table space is made up of specific one or more user-mode tables, indexes, etc.
The data inside.
Create tablespace: Connect to a user with DBA authority, such as system
[SQL]View Plaincopy
- sql> Create tablespace baicheng datafile ' f:\baicheng.dbf ' size 25M;
- Tablespace created
Create User: User name yuge, user password yuge, table space Baicheng
[SQL]View Plaincopy
- sql> Create user Yuge
- 2 identified by Yuge
- 3 default tablespace Baicheng;
Authorized to User (grant RESOURCE,CONNECT,DBA,SYSDBA to test)
[SQL]View Plaincopy
- Sql> Grant connect to Yuge;
- Grant succeeded
- Sql> grant resource to Yuge;
- Grant succeeded
Revoke permissions
[SQL]View Plaincopy
- Sql> revoke connect from Yuge;
- Revoke succeeded
- Sql> revoke resource from Yuge;
- Revoke succeeded
Delete the user (add cascade, so that even the user's own created tables are deleted, if not add just delete the current user)
[SQL]View Plaincopy
- sql> drop user Yuge cascade;
- User dropped
Delete Table space (drop tablespace Baicheng including contents and datafiles; Delete with baicheng.dbf file)
[SQL]View Plaincopy
- sql> drop tablespace Baicheng;
- Tablespace dropped
Oracle creates table spaces, creates users, authorizes, seizes power, deletes users, deletes table spaces