ORACLE创建数据库表空间文件,创建表空间,创建用户并为用户指定表空间

1、创建表空间及表空间文件,表空间文件放在哪里可以从select * from dba_data_files ; 表中查询
create tablespace TBS_CH_YY0A datafile '/opt/CRM_yaceData/TBS_CH_YY0A.dbf' size 50m autoextend on next 50m maxsize unlimited;
create tablespace TBS_CH_SETTLE datafile '/opt/CRM_yaceData/TBS_CH_SETTLE.dbf' size 50m autoextend on next 50m maxsize unlimited;
--查看表空间信息
select * from dba_data_files;
select * from dba_tablespaces;

2、创建用时指定表空间
--yy0a
create user YY0A
identified by "yy0a"
default tablespace TBS_CH_YY0A
temporary tablespace TEMP
profile DEFAULT;
-- Grant/Revoke role privileges
grant connect to YY0A;
grant dba to YY0A;
grant resource to YY0A;
-- Grant/Revoke system privileges
grant execute any procedure to YY0A;
grant execute any type to YY0A;
grant select any dictionary to YY0A;
grant select any sequence to YY0A;
grant select any table to YY0A;
grant unlimited tablespace to YY0A;
--settle
create user settle
identified by "settle"
default tablespace TBS_CH_SETTLE
temporary tablespace TEMP
profile DEFAULT;
-- Grant/Revoke role privileges
grant connect to settle;
grant dba to settle;
grant resource to settle;
-- Grant/Revoke system privileges
grant execute any procedure to settle;
grant execute any type to settle;
grant select any dictionary to settle;
grant select any sequence to settle;
grant select any table to settle;
grant unlimited tablespace to settle;

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值