请通过浏览器功能收藏网页

Oracle数据库创建表空间 临时空间 创建用户 分配权限一条龙 数据库问题

发布时间:2018-08-07 11:15:54  作者:本站编辑  来源:本站原创  浏览次数:
www.javainfo.com.cn 上干货 欢迎收藏

/*分为四步 */

/*第1步:创建临时表空间  */

create temporary tablespace user_temp  

tempfile 'D:\oracle\oradata\Oracle9i\user_temp.dbf' 

size 50m  

autoextend on  

next 50m maxsize 20480m  

extent management local;  

 

/*第2步:创建数据表空间  */

create tablespace user_data  

logging  

datafile 'D:\oracle\oradata\Oracle9i\user_data.dbf' 

size 50m  

autoextend on  

next 50m maxsize 20480m  

extent management local;  

 

/*第3步:创建用户并指定表空间  */

create user username identified by password  

default tablespace user_data  

temporary tablespace user_temp;  

 

/*第4步:给用户授予权限  */

grant connect,resource,dba to username;



--------------------------------

58


xulie


-- Create sequence 

create sequence S_JC_ACQUISITION

minvalue 1

maxvalue 999999999999999999999999999

start with 22

increment by 1

cache 20;




--创建表空间

create tablespace jeecmsv  

logging  datafile 'D:\oracle\oradata\Oracle9i\user_data.dbf' 

size 50m  autoextend on  next 50m maxsize 2048m  

extent management local;  


-- Create the user 

create user jeecmsv5

  identified by passwordc

  default tablespace jeecmsv

  temporary tablespace TEMP

  profile DEFAULT

  password expire;

-- Grant/Revoke role privileges 

grant connect to jeecmsv5;

grant dba to jeecmsv5;

grant resource to jeecmsv5;

-- Grant/Revoke system privileges 

grant alter any index to jeecmsv5;

grant alter any sequence to jeecmsv5;

grant alter any table to jeecmsv5;

grant create any index to jeecmsv5;

grant create any sequence to jeecmsv5;

grant create any table to jeecmsv5;

grant drop any index to jeecmsv5;

grant drop any sequence to jeecmsv5;

grant drop any table to jeecmsv5;

grant select any sequence to jeecmsv5;

grant select any table to jeecmsv5;

grant unlimited tablespace to jeecmsv5;

grant update any table to jeecmsv5;



如有疑问 请留言 欢迎提供建议

评论已有 0