oracle11g表空间管理
在plsql工具中执行以下语句,可建立Oracle表空间。
/*分为四步 */
/*第1步:创建临时表空间 */
create temporary tablespace yuhang_temp
tempfile '/data/e7db/yuhang_temp.dbf'
size 50m
autoextend on
next 50m maxsize 480m
extent management local;
或者
#create temporary tablespace yuhang_temp
#tempfile '/data/e7db/yuhang_temp.dbf'
#size 500m
#extent management local;
/*第2步:创建数据表空间 */
create tablespace yuhang_data
logging
datafile '/data/e7db/yuhang_data.dbf'
size 50m
autoextend on
next 50m maxsize 1480m
extent management local;
or:
create tablespace yuhang_data
logging
datafile '/data/e7db/yuhang_data.dbf'
size 3000m
extent management local;
/*第3步:创建用户并指定表空间 */
create user yuhang identified by yuhang
default tablespace yuhang_data
temporary tablespace yuhang_temp;
/*第4步:给用户授予权限 */
grant connect,resource,dba to yuhang;
grant create any sequence to yuhang;
grant create any table to yuhang;
grant delete any table to yuhang;
grant insert any table to yuhang;
grant select any table to yuhang;
grant unlimited tablespace to yuhang;
grant execute any procedure to yuhang;
grant update any table to yuhang;
grant create any view to yuhang;