oracle 创建用户和表空间

1,创建临时表空间
create temporary tablespace HT_TEMP
tempfile 'E:\oracle\product\10.2.0\oradata\orcl\HT_TEMP.dbf'
size 32m
autoextend on
next 32m maxsize 2048m
extent management local;
2,创建表空间
create tablespace HT
logging
datafile 'E:\oracle\product\10.2.0\oradata\orcl\HT_001.dbf'
size 100m
autoextend on
next 32m maxsize 2048m
extent management local;
3,创建用户并指定表空间

create user htpush identified by htpush default tablespace HT temporary tablespace HT_TEMP;

4,//授予message用户DBA角色的所有权限

GRANT DBA TO htpush;
5,给用户授予权限

grant connect,resource to htpush; (db2:指定所有权限)

 

 

 

 

 

 

 

 

 

------------------------------------------------更新版----------------------------------------------------

 

 

 

-----  1,创建临时表空间

create temporary tablespace HN_TEMP_01 

tempfile 'c:\oracle\product\11.2.0\oradata\orcl\HN_TEMP_01.dbf' 

size 32m 

autoextend on 

next 32m maxsize 2048m 

extent management local; 

------- 2,创建表空间

create tablespace HN_DATE_01 

logging 

datafile 'c:\oracle\product\11.2.0\oradata\orcl\HN_DATE_01.dbf' 

size 100m 

autoextend on 

next 32m maxsize 2048m 

extent management local; 

--------- 3,创建用户并指定表空间

create user hn_001 identified by hn_001 default tablespace HN_DATE_01 temporary tablespace HN_TEMP_01;

-------   4, 授予hn_001用户DBA角色的所有权限

GRANT DBA TO hn_001; 

------    5,给用户授予权限

grant connect,resource to hn_001;

猜你喜欢

转载自hai0378.iteye.com/blog/1770325