oracle 创建表空间用户

1、创建普通表空间和用户

//创建临时表空间
create temporary tablespace oa_temp
tempfile 'D:\app\Administrator\oradata\orcldjoa_temp.dbf'
size 32m
autoextend on
next 32m maxsize 20480m
extent management local;

//创建数据表空间
create tablespace oa
logging
datafile 'D:\app\Administrator\oradata\orcldjoa.dbf'
size 32m
autoextend on
next 32m maxsize 20480m
extent management local;

//创建用户
create user oa identified by oa
default tablespace oa
temporary tablespace oa_temp;

//给用户添加权限
GRANT CREATE USER,DROP USER,ALTER USER ,CREATE ANY VIEW ,
DROP ANY VIEW,EXP_FULL_DATABASE,IMP_FULL_DATABASE,
DBA,CONNECT,RESOURCE,CREATE SESSION TO oa

drop user oa cascade;
drop tablespace oa including contents and datafiles;
drop tablespace oa_temp including contents and datafiles;

2、创建大表空间和用户


//创建临时表空间
create bigfile temporary tablespace sxybyj_temp
tempfile 'E:\app\Administrator\oradata\orcl\sxybyj_temp.dbf'
size 128m
autoextend on
extent management local
uniform size 128k

//创建数据表空间
create bigfile tablespace sxybyj
datafile 'E:\app\Administrator\oradata\orcl\sxybyj.dbf'
size 128m
autoextend on
extent management local
uniform size 128k

//创建用户
create user sxybyj identified by sxybyj
default tablespace sxybyj
temporary tablespace sxybyj_temp;

//给用户添加权限
GRANT CREATE USER,DROP USER,ALTER USER ,CREATE ANY VIEW ,
DROP ANY VIEW,EXP_FULL_DATABASE,IMP_FULL_DATABASE,
DBA,CONNECT,RESOURCE,CREATE SESSION TO sxybyj

drop user sxybyj cascade;
drop user test1 cascade;
drop tablespace sxybyj including contents and datafiles;
drop tablespace sxybyj_temp including contents and datafiles;

 

转载于:https://www.cnblogs.com/tiandi/p/5004705.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值