Oracle 表空间

1. 创建数据表空间

1
2
3
drop TABLESPACE TBS_WEB_DATA;
CREATE TABLESPACE TBS_WEB_DATA LOGGING DATAFILE 'E:\oracle\product\10.2.0\busdata\ORCL\TBS_WEB_DATA.dbf'
SIZE 1024M AUTOEXTEND ON NEXT 1024M MAXSIZE 10240M EXTENT MANAGEMENT LOCAL;

2. 创建临时表空间

1
2
3
drop TABLESPACE TBS_WEB_TEMP;
create temporary tablespace TBS_WEB_TEMP tempfile 'E:\oracle\product\10.2.0\busdata\ORCL\TBS_WEB_TEMP.dbf'
size 1024M autoextend on next 64m maxsize 2048m extent management local;

3. 创建索引表空间

1
2
3
drop TABLESPACE TBS_WEB_IDX;
create TABLESPACE TBS_WEB_IDX LOGGING DATAFILE 'E:\oracle\product\10.2.0\busdata\ORCL\TBS_WEB_IDX.dbf'
size 128M autoextend on next 64m maxsize 2048m extent management local;

4. 创建用户

1
CREATE USER webroot IDENTIFIED BY webroot DEFAULT TABLESPACE TBS_WEB_DATA TEMPORARY TABLESPACE TBS_WEB_TEMP;

5. 赋权

1
2
grant connect,resource,dba to webroot;
grant create session to webroot;